diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-19 10:45:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-19 10:45:53 +0100 |
| commit | 4dbe966fdd9822ff643a04b30b66f295f3f38fe2 (patch) | |
| tree | c98d4a1d7ec42c96d8295be3a5f1078685694630 /compiler/rustc_session/src | |
| parent | a2db9004cb3404aba0ef7f6816ad99925bfe45b8 (diff) | |
| parent | 391332c5d9d5a5e97a0d36e011a87ad43045cfd3 (diff) | |
| download | rust-4dbe966fdd9822ff643a04b30b66f295f3f38fe2.tar.gz rust-4dbe966fdd9822ff643a04b30b66f295f3f38fe2.zip | |
Rollup merge of #92042 - ChrisDenton:msvc-static-tls, r=nagisa
Enable `#[thread_local]` for all windows-msvc targets As it stands, `#[thread_local]` is enabled haphazardly for msvc. It seems all 64-bit targets have it enabled, but not 32-bit targets unless they're also UWP targets (perhaps because UWP was added more recently?). So this PR simply enables it for 32-bit targets as well. I can't think of a reason not to and I've confirmed by running tests locally which pass. See also #91659
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 50a8f033672..de5ff231d61 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -880,7 +880,7 @@ fn default_configuration(sess: &Session) -> CrateConfig { ret.insert((sym::target_env, Some(Symbol::intern(env)))); ret.insert((sym::target_abi, Some(Symbol::intern(abi)))); ret.insert((sym::target_vendor, Some(Symbol::intern(vendor)))); - if sess.target.has_elf_tls { + if sess.target.has_thread_local { ret.insert((sym::target_thread_local, None)); } for (i, align) in [ |
