about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-17 08:11:41 +0000
committerbors <bors@rust-lang.org>2023-09-17 08:11:41 +0000
commitcdd182cbb2d11bb25d2dabdd752cc5980e0ac059 (patch)
treecb4935cce30f4059fcc5f395a557016fb81cb8b1 /src/bootstrap/lib.rs
parent3ecc563628d0ca62c3b6983c1cd05c4d4a0002b2 (diff)
parent9971008b8d83380797df2ab586fcfcfb04f4cfb9 (diff)
downloadrust-cdd182cbb2d11bb25d2dabdd752cc5980e0ac059.tar.gz
rust-cdd182cbb2d11bb25d2dabdd752cc5980e0ac059.zip
Auto merge of #115514 - onur-ozkan:bootstrap-codebase-improvements, r=albertlarsan68
optimize and cleanup bootstrap source

I suggest reviewing this commit by commit.
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r--src/bootstrap/lib.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 671d25484d0..1e001fae8ab 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<Mode>, &'static str, Option<&[&'static str]>)] = &[
+const EXTRA_CHECK_CFGS: &[(Option<Mode>, &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