1
Fork 0
rust/compiler/rustc_target/src
bors f98598c6cd Auto merge of #108089 - Zoxc:windows-tls, r=bjorn3
Support TLS access into dylibs on Windows

This allows access to `#[thread_local]`  in upstream dylibs on Windows by introducing a MIR shim to return the address of the thread local. Accesses that go into an upstream dylib will call the MIR shim to get the address of it.

`convert_tls_rvalues` is introduced in `rustc_codegen_ssa` which rewrites MIR TLS accesses to dummy calls which are replaced with calls to the MIR shims when the dummy calls are lowered to backend calls.

A new `dll_tls_export` target option enables this behavior with a `false` value which is set for Windows platforms.

This fixes https://github.com/rust-lang/rust/issues/84933.
2023-03-29 16:20:37 +00:00
..
abi Rollup merge of #107163 - mikebenfield:parameters-pr, r=TaKO8Ki 2023-02-15 12:24:54 +05:30
asm Use FxIndexSet instead of FxHashSet for asm_target_features query. 2023-03-01 10:19:26 +01:00
spec Auto merge of #108089 - Zoxc:windows-tls, r=bjorn3 2023-03-29 16:20:37 +00:00
json.rs Improve generating Custom entry function 2022-11-11 01:04:39 +05:30
lib.rs compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
tests.rs Use serde_json for target spec json 2022-06-03 16:46:19 +00:00