about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2024-06-13 15:06:34 +0300
committeronur-ozkan <work@onurozkan.dev>2024-06-13 15:06:34 +0300
commit58e3ac0877bc5daf53e42383fc51b8c8e2d2a7bb (patch)
tree93fb491fab04c61945ed67158424e83c48f5e540 /src/bootstrap
parent02c7a5921e3de5c2b3ecb2e0082c1dafce0729a1 (diff)
downloadrust-58e3ac0877bc5daf53e42383fc51b8c8e2d2a7bb.tar.gz
rust-58e3ac0877bc5daf53e42383fc51b8c8e2d2a7bb.zip
extend the check for LLVM build
We don't build LLVM when using the precompiled version from the CI builder.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/sanity.rs27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs
index b5f17b9f54e..da80f10b7dd 100644
--- a/src/bootstrap/src/core/sanity.rs
+++ b/src/bootstrap/src/core/sanity.rs
@@ -137,19 +137,20 @@ pub fn check(build: &mut Build) {
     }
 
     // We need cmake, but only if we're actually building LLVM or sanitizers.
-    let building_llvm = build
-        .hosts
-        .iter()
-        .map(|host| {
-            build.config.llvm_enabled(*host)
-                && build
-                    .config
-                    .target_config
-                    .get(host)
-                    .map(|config| config.llvm_config.is_none())
-                    .unwrap_or(true)
-        })
-        .any(|build_llvm_ourselves| build_llvm_ourselves);
+    let building_llvm = !build.config.llvm_from_ci
+        && build
+            .hosts
+            .iter()
+            .map(|host| {
+                build.config.llvm_enabled(*host)
+                    && build
+                        .config
+                        .target_config
+                        .get(host)
+                        .map(|config| config.llvm_config.is_none())
+                        .unwrap_or(true)
+            })
+            .any(|build_llvm_ourselves| build_llvm_ourselves);
 
     let need_cmake = building_llvm || build.config.any_sanitizers_to_build();
     if need_cmake && cmd_finder.maybe_have("cmake").is_none() {