Skip to content

Commit 617b7ce

Browse files
authored
Unrolled build for #141846
Rollup merge of #141846 - Berrysoft:cygwin-bootstrap-tls, r=mati865 Fix TLS model on bootstrap for cygwin There aren't other targets that both use emutls and enable `has_thread_local`, so cygwin triggers this bug first. r? mati865 See: #141719 (comment) ``@jeremyd2019`` Could you check if this PR fixes the issue? I just found my pre-built stage-0 rustc was too old to build the current rustc :(
2 parents a88fc0e + 810a564 commit 617b7ce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/src/core/builder/cargo.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,12 @@ impl Builder<'_> {
10041004
// efficient initial-exec TLS model. This doesn't work with `dlopen`,
10051005
// so we can't use it by default in general, but we can use it for tools
10061006
// and our own internal libraries.
1007-
if !mode.must_support_dlopen() && !target.triple.starts_with("powerpc-") {
1007+
//
1008+
// Cygwin only supports emutls.
1009+
if !mode.must_support_dlopen()
1010+
&& !target.triple.starts_with("powerpc-")
1011+
&& !target.triple.contains("cygwin")
1012+
{
10081013
cargo.env("RUSTC_TLS_MODEL_INITIAL_EXEC", "1");
10091014
}
10101015

0 commit comments

Comments
 (0)