@@ -443,23 +443,20 @@ 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" ) ;
463
460
}
464
461
465
462
if !enabled_llvm_runtimes. is_empty ( ) {
@@ -468,6 +465,12 @@ impl Step for Llvm {
468
465
cfg. define ( "LLVM_ENABLE_RUNTIMES" , enabled_llvm_runtimes. join ( ";" ) ) ;
469
466
}
470
467
468
+ if !enabled_llvm_projects. is_empty ( ) {
469
+ enabled_llvm_projects. sort ( ) ;
470
+ enabled_llvm_projects. dedup ( ) ;
471
+ cfg. define ( "LLVM_ENABLE_PROJECTS" , enabled_llvm_projects. join ( ";" ) ) ;
472
+ }
473
+
471
474
if let Some ( num_linkers) = builder. config . llvm_link_jobs
472
475
&& num_linkers > 0
473
476
{
0 commit comments