From 33f78c7016b90fdf90a157a3b62e10ee63c5dbc3 Mon Sep 17 00:00:00 2001
From: Aaron Hill <aa1ronham@gmail.com>
Date: Mon, 17 Aug 2020 19:31:37 -0400
Subject: [PATCH 1/3] Enable parallel compiler by default

It's been over a year since we last tried this - let's see what the
performance looks like now.
---
 src/bootstrap/config.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index fb2c6d1f92a80..4b08125cc8457 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -853,7 +853,7 @@ impl Config {
             set(&mut config.use_lld, rust.use_lld);
             set(&mut config.lld_enabled, rust.lld);
             set(&mut config.llvm_tools_enabled, rust.llvm_tools);
-            config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
+            config.rustc_parallel = rust.parallel_compiler.unwrap_or(true);
             config.rustc_default_linker = rust.default_linker;
             config.musl_root = rust.musl_root.map(PathBuf::from);
             config.save_toolstates = rust.save_toolstates.map(PathBuf::from);

From 605352650c3285c7cdf52146e8450457ea0b430b Mon Sep 17 00:00:00 2001
From: Mark Rousskov <mark.simulacrum@gmail.com>
Date: Sat, 29 Aug 2020 12:21:55 -0400
Subject: [PATCH 2/3] default to 12 threads

---
 compiler/rustc_session/src/options.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs
index 66c709b408098..e3fa1b8cfcb12 100644
--- a/compiler/rustc_session/src/options.rs
+++ b/compiler/rustc_session/src/options.rs
@@ -1103,7 +1103,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
     // a sequential compiler for now. This'll likely be adjusted
     // in the future. Note that -Zthreads=0 is the way to get
     // the num_cpus behavior.
-    threads: usize = (1, parse_threads, [UNTRACKED],
+    threads: usize = (12, parse_threads, [UNTRACKED],
         "use a thread pool with N threads"),
     time: bool = (false, parse_bool, [UNTRACKED],
         "measure time of rustc processes (default: no)"),

From dec816654b532537a48cd67e92c0b0f37dfd3197 Mon Sep 17 00:00:00 2001
From: bjorn3 <bjorn3@users.noreply.github.com>
Date: Fri, 4 Dec 2020 22:17:45 +0100
Subject: [PATCH 3/3] Default to 1 thread

---
 compiler/rustc_session/src/options.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs
index e3fa1b8cfcb12..66c709b408098 100644
--- a/compiler/rustc_session/src/options.rs
+++ b/compiler/rustc_session/src/options.rs
@@ -1103,7 +1103,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
     // a sequential compiler for now. This'll likely be adjusted
     // in the future. Note that -Zthreads=0 is the way to get
     // the num_cpus behavior.
-    threads: usize = (12, parse_threads, [UNTRACKED],
+    threads: usize = (1, parse_threads, [UNTRACKED],
         "use a thread pool with N threads"),
     time: bool = (false, parse_bool, [UNTRACKED],
         "measure time of rustc processes (default: no)"),