]> git.lizzy.rs Git - rust.git/commitdiff
Account for `submodules = false` in config.toml when updating LLVM submodule
authorJoshua Nelson <jyn514@gmail.com>
Sun, 11 Jul 2021 01:33:03 +0000 (21:33 -0400)
committerJoshua Nelson <jyn514@gmail.com>
Sun, 11 Jul 2021 01:33:16 +0000 (21:33 -0400)
src/bootstrap/native.rs

index b967b6dbd2daebc0acc2bf7cb110d048973821be..0be42d9b2348623abf72d4c256df3a4966d8a4fb 100644 (file)
@@ -99,6 +99,10 @@ fn dir_is_empty(dir: &Path) -> bool {
         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.