Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c33c16b

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

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,6 +1509,16 @@ impl Config {
15091509
}
15101510
set(&mut config.lld_mode, rust.lld_mode);
15111511
set(&mut config.lld_enabled, rust.lld);
1512+
1513+
if matches!(config.lld_mode, LldMode::SelfContained)
1514+
&& !config.lld_enabled
1515+
&& flags.stage.unwrap_or(0) > 0
1516+
{
1517+
panic!(
1518+
"Trying to use self-contained lld as a linker, but LLD is not being added to the sysroot. Enable it with rust.lld = true."
1519+
);
1520+
}
1521+
15121522
set(&mut config.llvm_tools_enabled, rust.llvm_tools);
15131523
config.rustc_parallel = rust
15141524
.parallel_compiler

0 commit comments

Comments
 (0)