about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-06-12 14:26:26 -0400
committerGitHub <noreply@github.com>2024-06-12 14:26:26 -0400
commit49b28a4f6a1040bedc0f108100727c28cbb51611 (patch)
treeccac57024e934484da22b6cd555ef356642f8c8d
parent306501044ee1dc2c32f58a4fa614e9438751970a (diff)
parentbbc50376b0f44c70e3a17a2db5cd16f3ad4f04f8 (diff)
downloadrust-49b28a4f6a1040bedc0f108100727c28cbb51611.tar.gz
rust-49b28a4f6a1040bedc0f108100727c28cbb51611.zip
Rollup merge of #126282 - lqd:contain-the-self-contained-linker, r=Mark-Simulacrum
Ensure self-contained linker is only enabled on dev/nightly

This is a version of #126278 for the master branch. It should be no-op _here_, compared to beta.

I'll r? `@Mark-Simulacrum` like the other one.
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index 66692a2a2cb..b16f3e5bd81 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -1137,7 +1137,9 @@ pub fn rustc_cargo_env(
     }
 
     // Enable rustc's env var for `rust-lld` when requested.
-    if builder.config.lld_enabled {
+    if builder.config.lld_enabled
+        && (builder.config.channel == "dev" || builder.config.channel == "nightly")
+    {
         cargo.env("CFG_USE_SELF_CONTAINED_LINKER", "1");
     }