From 9971008b8d83380797df2ab586fcfcfb04f4cfb9 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Thu, 14 Sep 2023 21:03:30 +0300 Subject: micro-level optimizations for bootstrap Overall optimizations for bootstrap on conditions, assertions, trait implementations, etc. Signed-off-by: onur-ozkan --- src/bootstrap/lib.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/bootstrap/lib.rs') diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 4396bbc51a3..644f61549b8 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -116,7 +116,7 @@ pub const VERSION: usize = 2; /// Extra --check-cfg to add when building /// (Mode restriction, config name, config values (if any)) -const EXTRA_CHECK_CFGS: &[(Option, &'static str, Option<&[&'static str]>)] = &[ +const EXTRA_CHECK_CFGS: &[(Option, &str, Option<&[&'static str]>)] = &[ (None, "bootstrap", None), (Some(Mode::Rustc), "parallel_compiler", None), (Some(Mode::ToolRustc), "parallel_compiler", None), @@ -1757,10 +1757,11 @@ to download LLVM rather than building it. // // In these cases we automatically enable Ninja if we find it in the // environment. - if !self.config.ninja_in_file && self.config.build.contains("msvc") { - if cmd_finder.maybe_have("ninja").is_some() { - return true; - } + if !self.config.ninja_in_file + && self.config.build.contains("msvc") + && cmd_finder.maybe_have("ninja").is_some() + { + return true; } self.config.ninja_in_file -- cgit 1.4.1-3-g733a5