@@ -443,23 +443,26 @@ impl Step for Llvm {
443443 // See https://github.com/rust-lang/rust/pull/50104
444444 cfg. define ( "LLVM_ENABLE_LIBXML2" , "OFF" ) ;
445445
446- if !enabled_llvm_projects. is_empty ( ) {
447- enabled_llvm_projects. sort ( ) ;
448- enabled_llvm_projects. dedup ( ) ;
449- cfg. define ( "LLVM_ENABLE_PROJECTS" , enabled_llvm_projects. join ( ";" ) ) ;
450- }
451-
452446 let mut enabled_llvm_runtimes = Vec :: new ( ) ;
453447
454448 if helpers:: forcing_clang_based_tests ( ) {
455449 enabled_llvm_runtimes. push ( "compiler-rt" ) ;
456450 }
457451
452+ // This is an experimental flag, which likely builds more than necessary.
453+ // We will optimize it when we get closer to releasing it on nightly.
458454 if builder. config . llvm_offload {
459455 enabled_llvm_runtimes. push ( "offload" ) ;
460456 //FIXME(ZuseZ4): LLVM intends to drop the offload dependency on openmp.
461457 //Remove this line once they achieved it.
462458 enabled_llvm_runtimes. push ( "openmp" ) ;
459+ enabled_llvm_projects. push ( "compiler-rt" ) ;
460+ }
461+
462+ if !enabled_llvm_projects. is_empty ( ) {
463+ enabled_llvm_projects. sort ( ) ;
464+ enabled_llvm_projects. dedup ( ) ;
465+ cfg. define ( "LLVM_ENABLE_PROJECTS" , enabled_llvm_projects. join ( ";" ) ) ;
463466 }
464467
465468 if !enabled_llvm_runtimes. is_empty ( ) {
0 commit comments