Skip to content

Commit

Permalink
Inline maybe_update_submodule
Browse files Browse the repository at this point in the history
It was a trivial function only used once.
  • Loading branch information
jyn514 committed Jun 5, 2021
1 parent 2fbe2ca commit 73a40ac
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 73a40ac

Please sign in to comment.