diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 8454abd714259..3ed53452309c7 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -579,6 +579,8 @@ impl Build { for s in rust_submodules { build.update_submodule(Path::new(s)); } + // Now, update all existing submodules. + build.update_existing_submodules(); build.verbose("learning about cargo"); metadata::build(&mut build); @@ -674,7 +676,7 @@ impl Build { /// If any submodule has been initialized already, sync it unconditionally. /// This avoids contributors checking in a submodule change by accident. - pub fn maybe_update_submodules(&self) { + pub fn update_existing_submodules(&self) { // Avoid running git when there isn't a git checkout. if !self.config.submodules(&self.rust_info()) { return; @@ -703,8 +705,6 @@ impl Build { job::setup(self); } - self.maybe_update_submodules(); - if let Subcommand::Format { check, paths } = &self.config.cmd { return format::format(&builder::Builder::new(&self), *check, &paths); }