Skip to content

Commit 28ce76e

Browse files
committed
bootstrap: introduce rust-lld env var for rustc
This is used to notify we want to use rust-lld as the default linker in a target.
1 parent 4a78c00 commit 28ce76e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,11 @@ pub fn rustc_cargo_env(
11361136
cargo.env("CFG_DEFAULT_LINKER", s);
11371137
}
11381138

1139+
// Enable rustc's env var for `rust-lld` when requested.
1140+
if builder.config.lld_enabled {
1141+
cargo.env("CFG_USE_SELF_CONTAINED_LINKER", "1");
1142+
}
1143+
11391144
if builder.config.rust_verify_llvm_ir {
11401145
cargo.env("RUSTC_VERIFY_LLVM_IR", "1");
11411146
}

0 commit comments

Comments
 (0)