rust/compiler/rustc_codegen_ssa/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
..
back Auto merge of #108089 - Zoxc:windows-tls, r=bjorn3 2023-03-29 16:20:37 +00:00
coverageinfo Remove in_band_lifetimes from rustc_codegen_ssa 2021-12-15 00:41:41 -05:00
debuginfo s/eval_usize/eval_target_usize/ for clarity 2023-02-14 08:51:19 +00:00
mir Support TLS access into dylibs on Windows 2023-03-29 08:55:21 +02:00
traits Use poison instead of undef 2023-03-16 15:07:04 +01:00
base.rs Refactor: VariantIdx::from_u32(0) -> FIRST_VARIANT 2023-03-25 18:58:25 -07:00
codegen_attrs.rs Auto merge of #109091 - Nilstrieb:match-on-attr, r=cjgillot 2023-03-27 05:01:19 +00:00
common.rs DELETE - fn span_invalid_monomorphization_error and localize intrinsics macros 2022-12-27 20:59:22 -05:00
errors.rs errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
glue.rs Use size_of_val instead of manual calculation 2023-03-17 19:55:49 -07:00
lib.rs The name of NativeLib will be presented 2023-03-19 11:23:19 +08:00
meth.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
mono_item.rs Store a LocalDefId in hir::AnonConst. 2022-11-13 14:06:11 +00:00
target_features.rs Auto merge of #109001 - matthiaskrgr:rollup-a3agnwp, r=matthiaskrgr 2023-03-11 07:28:44 +00:00