about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-06-05 12:49:51 -0400
committerJoshua Nelson <jyn514@gmail.com>2021-06-05 12:49:51 -0400
commit73a40ac1a0bf9e7adfe69a886727d64bc69fec05 (patch)
tree0b57b18c5bc60c44214fcef8fdb4e7a1c6fdb08c /src
parent2fbe2ca916e4a815a15c5100bc5ad1452d33a314 (diff)
downloadrust-73a40ac1a0bf9e7adfe69a886727d64bc69fec05.tar.gz
rust-73a40ac1a0bf9e7adfe69a886727d64bc69fec05.zip
Inline maybe_update_submodule
It was a trivial function only used once.
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/lib.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index a351290a420..a5b1664ed69 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -472,21 +472,17 @@ impl Build {
         slice::from_ref(&self.build.triple)
     }
 
-    /// If the LLVM submodule has been initialized already, sync it unconditionally. This avoids
-    /// contributors checking in a submodule change by accident.
-    pub fn maybe_update_llvm_submodule(&self) {
-        if self.in_tree_llvm_info.is_git() {
-            native::update_llvm_submodule(self);
-        }
-    }
-
     /// Executes the entire build, as configured by the flags and configuration.
     pub fn build(&mut self) {
         unsafe {
             job::setup(self);
         }
 
-        self.maybe_update_llvm_submodule();
+        // If the LLVM submodule has been initialized already, sync it unconditionally. This avoids
+        // contributors checking in a submodule change by accident.
+        if self.in_tree_llvm_info.is_git() {
+            native::update_llvm_submodule(self);
+        }
 
         if let Subcommand::Format { check, paths } = &self.config.cmd {
             return format::format(self, *check, &paths);