about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/native.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index b967b6dbd2d..0be42d9b234 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -99,6 +99,10 @@ pub(crate) fn update_llvm_submodule(build: &Build) {
         t!(std::fs::read_dir(dir)).next().is_none()
     }
 
+    if !build.config.submodules {
+        return;
+    }
+
     // NOTE: The check for the empty directory is here because when running x.py
     // the first time, the llvm submodule won't be checked out. Check it out
     // now so we can build it.