Skip to content

Commit

Permalink
Clone the src/llvm-project submodule if profiling is enabled
Browse files Browse the repository at this point in the history
To compile rustc with profiling information, `compiler-rt` from
LLVM is required. Building it requires the `src/llvm-project` submodule
to be initialized and updated.
  • Loading branch information
Noratrieb committed Jul 28, 2022
1 parent 36f4f4a commit e1e736b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ impl Step for Std {

builder.update_submodule(&Path::new("library").join("stdarch"));

// Profiler information requires LLVM's compiler-rt
if builder.config.profiler {
builder.update_submodule(&Path::new("src/llvm-project"));
}

let mut target_deps = builder.ensure(StartupObjects { compiler, target });

let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
Expand Down

0 comments on commit e1e736b

Please sign in to comment.