Skip to content

Commit e637f9b

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 0e15f5e commit e637f9b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,11 @@ pub fn rustc_cargo_env(
11291129
cargo.env("CFG_DEFAULT_LINKER", s);
11301130
}
11311131

1132+
// Enable rustc's env var for `rust-lld` when requested.
1133+
if builder.config.lld_enabled {
1134+
cargo.env("CFG_USE_SELF_CONTAINED_LINKER", "1");
1135+
}
1136+
11321137
if builder.config.rust_verify_llvm_ir {
11331138
cargo.env("RUSTC_VERIFY_LLVM_IR", "1");
11341139
}

0 commit comments

Comments
 (0)