about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJacob Heider <jacob@tea.xyz>2023-03-09 20:15:40 -0500
committerGitHub <noreply@github.com>2023-03-09 20:15:40 -0500
commit54e5c19f087f11ed0a0a88c1f4f34cc8cac574fd (patch)
treed401c9762cd5d5dce73d3ce3a82c65869e284710
parent39f2657d1101b50f9b71ae460b762d330cc8426b (diff)
downloadrust-54e5c19f087f11ed0a0a88c1f4f34cc8cac574fd.tar.gz
rust-54e5c19f087f11ed0a0a88c1f4f34cc8cac574fd.zip
only call git on git checkouts
-rw-r--r--src/bootstrap/native.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 909e7d83a15..7f6d80c91ad 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -216,7 +216,7 @@ pub(crate) fn is_ci_llvm_available(config: &Config, asserts: bool) -> bool {
 
 /// Returns true if we're running in CI with modified LLVM (and thus can't download it)
 pub(crate) fn is_ci_llvm_modified(config: &Config) -> bool {
-    CiEnv::is_ci() && {
+    CiEnv::is_ci() && config.rust_info.is_managed_git_subrepository() && {
         // We assume we have access to git, so it's okay to unconditionally pass
         // `true` here.
         let llvm_sha = detect_llvm_sha(config, true);