@@ -443,23 +443,26 @@ impl Step for Llvm {
443
443
// See https://github.com/rust-lang/rust/pull/50104
444
444
cfg. define ( "LLVM_ENABLE_LIBXML2" , "OFF" ) ;
445
445
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
-
452
446
let mut enabled_llvm_runtimes = Vec :: new ( ) ;
453
447
454
448
if helpers:: forcing_clang_based_tests ( ) {
455
449
enabled_llvm_runtimes. push ( "compiler-rt" ) ;
456
450
}
457
451
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.
458
454
if builder. config . llvm_offload {
459
455
enabled_llvm_runtimes. push ( "offload" ) ;
460
456
//FIXME(ZuseZ4): LLVM intends to drop the offload dependency on openmp.
461
457
//Remove this line once they achieved it.
462
458
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 ( ";" ) ) ;
463
466
}
464
467
465
468
if !enabled_llvm_runtimes. is_empty ( ) {
0 commit comments