about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-07-29 15:40:04 +0900
committerGitHub <noreply@github.com>2022-07-29 15:40:04 +0900
commita8f77ade97342ea0d4ed5198be9eb6505adde42c (patch)
treecb41657d9514ca2d9195b7b5f0bb190b5a865f72
parent51dda5067c9a3e902df87f5b1e0bc0992da52063 (diff)
parente1e736b2a3fb1322a34387d251aa1a78f81be78b (diff)
downloadrust-a8f77ade97342ea0d4ed5198be9eb6505adde42c.tar.gz
rust-a8f77ade97342ea0d4ed5198be9eb6505adde42c.zip
Rollup merge of #99872 - Nilstrieb:bootstrap-llvm, r=jyn514
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.

Fixes #99869
-rw-r--r--src/bootstrap/compile.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index aa7cda46bda..dd2b9d59366 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -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);