Skip to content

Commit 333ee68

Browse files
committed
Disable combining LLD with external llvm-config
1 parent 58c2dd9 commit 333ee68

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Diff for: src/bootstrap/src/core/build_steps/compile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2182,7 +2182,7 @@ impl Step for Assemble {
21822182
debug!("copying codegen backends to sysroot");
21832183
copy_codegen_backends_to_sysroot(builder, build_compiler, target_compiler);
21842184

2185-
if builder.config.lld_enabled {
2185+
if builder.config.lld_enabled && !builder.is_system_llvm(target_compiler.host) {
21862186
builder.ensure(crate::core::build_steps::tool::LldWrapper {
21872187
build_compiler,
21882188
target_compiler,

Diff for: src/bootstrap/src/core/config/config.rs

+9
Original file line numberDiff line numberDiff line change
@@ -2397,6 +2397,15 @@ impl Config {
23972397
);
23982398
}
23992399

2400+
if config
2401+
.target_config
2402+
.get(&config.build)
2403+
.is_some_and(|config| config.llvm_config.is_some())
2404+
&& config.lld_enabled
2405+
{
2406+
panic!("Cannot enable LLD when using external llvm-config.");
2407+
}
2408+
24002409
let default_std_features = BTreeSet::from([String::from("panic-unwind")]);
24012410
config.rust_std_features = std_features.unwrap_or(default_std_features);
24022411

0 commit comments

Comments
 (0)