Skip to content

Commit 72e5ff2

Browse files
committed
Error out when self-contained LLD is requested, but it is not provided
1 parent dad58f1 commit 72e5ff2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/bootstrap/config.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,16 @@ impl Config {
14981498
}
14991499
set(&mut config.lld_mode, rust.lld_mode);
15001500
set(&mut config.lld_enabled, rust.lld);
1501+
1502+
if matches!(config.lld_mode, LldMode::SelfContained)
1503+
&& !config.lld_enabled
1504+
&& flags.stage.unwrap_or(0) > 0
1505+
{
1506+
panic!(
1507+
"Self-contained LLD was requested with `rust.use-lld`, but it is not be available (`rust.lld` is false)."
1508+
);
1509+
}
1510+
15011511
set(&mut config.llvm_tools_enabled, rust.llvm_tools);
15021512
config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
15031513
config.rustc_default_linker = rust.default_linker;

0 commit comments

Comments
 (0)