about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-05-30 13:39:53 +0200
committerGitHub <noreply@github.com>2025-05-30 13:39:53 +0200
commitc61a1e0f9bbc48d5807c5b2f6b58be81788beb99 (patch)
tree753bb2a98a2111190422308aa9d1dc4dec6ca995 /compiler
parentbace7f986c3ec200ff7389a40116847c79680a99 (diff)
parent9281958c6ac7dd55f4fe143f7268694eeade5abd (diff)
Rollup merge of #141719 - Berrysoft:cygwin-tls-model, r=mati865
Add tls_model for cygwin and enable has_thread_local

I've also tried to set `has_thread_local` to `true` and found it works actually. Why do we still implement our own `thread_local` instead of delegating all of them to LLVM?

cc: `@jeremyd2019`
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_target/src/spec/base/cygwin.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/spec/base/cygwin.rs b/compiler/rustc_target/src/spec/base/cygwin.rs
index 819d1d68a71..d6ae0a905bf 100644
--- a/compiler/rustc_target/src/spec/base/cygwin.rs
+++ b/compiler/rustc_target/src/spec/base/cygwin.rs
@@ -1,7 +1,8 @@
 use std::borrow::Cow;
 
 use crate::spec::{
-    BinaryFormat, Cc, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOptions, cvs,
+    BinaryFormat, Cc, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOptions, TlsModel,
+    cvs,
 };
 
 pub(crate) fn opts() -> TargetOptions {
@@ -44,6 +45,8 @@ pub(crate) fn opts() -> TargetOptions {
         eh_frame_header: false,
         debuginfo_kind: DebuginfoKind::Dwarf,
         supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
+        tls_model: TlsModel::Emulated,
+        has_thread_local: true,
         ..Default::default()
     }
 }