Skip to content

Commit 4750e9d

Browse files
committed
Produce an explicit error when using a self-contained lld, but we don't add it to sysroot
1 parent ea769db commit 4750e9d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/bootstrap/src/core/config/config.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,16 @@ impl Config {
15191519
}
15201520
set(&mut config.lld_mode, rust.lld_mode);
15211521
set(&mut config.lld_enabled, rust.lld);
1522+
1523+
if matches!(config.lld_mode, LldMode::SelfContained)
1524+
&& !config.lld_enabled
1525+
&& flags.stage.unwrap_or(0) > 0
1526+
{
1527+
panic!(
1528+
"Trying to use self-contained lld as a linker, but LLD is not being added to the sysroot. Enable it with rust.lld = true."
1529+
);
1530+
}
1531+
15221532
set(&mut config.llvm_tools_enabled, rust.llvm_tools);
15231533
config.rustc_parallel = rust
15241534
.parallel_compiler

0 commit comments

Comments
 (0)