From 89d260f86eacde2a44e3af02a99b0bdf3ffea35a Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Sat, 10 Jul 2021 21:33:03 -0400 Subject: [PATCH] Account for `submodules = false` in config.toml when updating LLVM submodule --- src/bootstrap/native.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index b967b6dbd2dae..0be42d9b23486 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.