From a90aa762563a3220c7615a2d16c0c26e8a852fe6 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 17 Aug 2020 19:31:37 -0400 Subject: [PATCH 1/2] [DO NOT MERGE] 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 70b1c471ac3f0..2ad0e1f5f2853 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -657,7 +657,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.clone(); config.musl_root = rust.musl_root.clone().map(PathBuf::from); config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from); From 9a17037ed6dfaf36e9cb3aacf3cf90c2317693fe Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Sat, 29 Aug 2020 12:21:55 -0400 Subject: [PATCH 2/2] default to 12 threads --- src/librustc_session/options.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index 80164840334a2..4cb0b83aa9803 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -1030,7 +1030,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)"),