Skip to content

Commit

Permalink
ensure the self-contained linker is only enabled on nightly/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Jun 11, 2024
1 parent 0c96061 commit bbc5037
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down

0 comments on commit bbc5037

Please sign in to comment.