File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff 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,
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments