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.
This commit is contained in:
Michael Goulet 2024-06-12 14:26:26 -04:00 committed by GitHub
commit 49b28a4f6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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");
}