Make combining LLD with external LLVM config a hard error

This commit is contained in:
Jakub Beránek 2025-06-29 09:34:45 +02:00
parent dddd7ab962
commit 890f81b1fc
No known key found for this signature in database
GPG key ID: 909CD0D26483516B
2 changed files with 2 additions and 4 deletions

View file

@ -2241,7 +2241,7 @@ impl Step for Assemble {
debug!("copying codegen backends to sysroot");
copy_codegen_backends_to_sysroot(builder, build_compiler, target_compiler);
if builder.config.lld_enabled && !builder.config.is_system_llvm(target_compiler.host) {
if builder.config.lld_enabled {
builder.ensure(crate::core::build_steps::tool::LldWrapper {
build_compiler,
target_compiler,

View file

@ -1003,9 +1003,7 @@ impl Config {
}
if config.lld_enabled && config.is_system_llvm(config.host_target) {
eprintln!(
"Warning: LLD is enabled when using external llvm-config. LLD will not be built and copied to the sysroot."
);
panic!("Cannot enable LLD with `rust.lld = true` when using external llvm-config.");
}
config.optimized_compiler_builtins =