Skip to content

Commit

Permalink
Produce an explicit error when using a self-contained lld, but we don…
Browse files Browse the repository at this point in the history
…'t add it to sysroot
  • Loading branch information
Kobzol committed Dec 10, 2023
1 parent ea769db commit 4750e9d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,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!(
"Trying to use self-contained lld as a linker, but LLD is not being added to the sysroot. Enable it with rust.lld = true."
);
}

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

0 comments on commit 4750e9d

Please sign in to comment.