Skip to content

Commit e1e736b

Browse files
committed
Clone the src/llvm-project submodule if profiling is enabled
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.
1 parent 36f4f4a commit e1e736b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bootstrap/compile.rs

+5
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ impl Step for Std {
111111

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

114+
// Profiler information requires LLVM's compiler-rt
115+
if builder.config.profiler {
116+
builder.update_submodule(&Path::new("src/llvm-project"));
117+
}
118+
114119
let mut target_deps = builder.ensure(StartupObjects { compiler, target });
115120

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

0 commit comments

Comments
 (0)