Skip to content

Commit

Permalink
Error out when self-contained LLD is requested, but it is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Oct 2, 2023
1 parent dad58f1 commit 72e5ff2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,16 @@ impl Config {
}
set(&mut config.lld_mode, rust.lld_mode);
set(&mut config.lld_enabled, rust.lld);

if matches!(config.lld_mode, LldMode::SelfContained)
&& !config.lld_enabled
&& flags.stage.unwrap_or(0) > 0
{
panic!(
"Self-contained LLD was requested with `rust.use-lld`, but it is not be available (`rust.lld` is false)."
);
}

set(&mut config.llvm_tools_enabled, rust.llvm_tools);
config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
config.rustc_default_linker = rust.default_linker;
Expand Down

0 comments on commit 72e5ff2

Please sign in to comment.