@@ -458,20 +458,13 @@ pub fn std_crates_for_run_make(run: &RunConfig<'_>) -> Vec<String> {
458
458
459
459
/// Tries to find LLVM's `compiler-rt` source directory, for building `library/profiler_builtins`.
460
460
///
461
- /// Normally it lives in the `src/llvm-project` submodule, but if that submodule
462
- /// is absent and we have downloaded a copy of CI LLVM, then we try to use the
463
- /// `compiler-rt` sources from there instead, which lets us avoid checking out
464
- /// the LLVM submodule.
461
+ /// Normally it lives in the `src/llvm-project` submodule, but if we will be using a
462
+ /// downloaded copy of CI LLVM, then we try to use the `compiler-rt` sources from
463
+ /// there instead, which lets us avoid checking out the LLVM submodule.
465
464
fn compiler_rt_for_profiler ( builder : & Builder < ' _ > ) -> PathBuf {
466
- // If the LLVM submodule is already active, just update it and use that.
467
- builder. update_existing_submodule ( "src/llvm-project" ) ;
468
- let submodule_compiler_rt = builder. src . join ( "src/llvm-project/compiler-rt" ) ;
469
- if submodule_compiler_rt. exists ( ) {
470
- return submodule_compiler_rt;
471
- }
472
-
473
465
// Try to use `compiler-rt` sources from downloaded CI LLVM, if possible.
474
466
if builder. config . llvm_from_ci {
467
+ builder. config . maybe_download_ci_llvm ( ) ;
475
468
let ci_llvm_compiler_rt = builder. config . ci_llvm_root ( ) . join ( "compiler-rt" ) ;
476
469
if ci_llvm_compiler_rt. exists ( ) {
477
470
return ci_llvm_compiler_rt;
@@ -482,7 +475,7 @@ fn compiler_rt_for_profiler(builder: &Builder<'_>) -> PathBuf {
482
475
builder. require_submodule ( "src/llvm-project" , {
483
476
Some ( "The `build.profiler` config option requires `compiler-rt` sources from LLVM." )
484
477
} ) ;
485
- submodule_compiler_rt
478
+ builder . src . join ( "src/llvm-project/compiler-rt" )
486
479
}
487
480
488
481
/// Configure cargo to compile the standard library, adding appropriate env vars
0 commit comments