From 008fc79dcd821b08a1ab64f5fba40dcc4bcd3aee Mon Sep 17 00:00:00 2001 From: klensy Date: Fri, 11 Feb 2022 23:25:14 +0300 Subject: Propagate `parallel_compiler` feature through rustc crates. Turned off feature gives change of builded crates: 238 -> 224. --- src/bootstrap/lib.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/bootstrap/lib.rs') diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 41e2e976162..8f076ad914d 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -729,12 +729,16 @@ impl Build { /// Gets the space-separated set of activated features for the compiler. fn rustc_features(&self, kind: Kind) -> String { - let mut features = String::new(); + let mut features = vec![]; if self.config.jemalloc { - features.push_str("jemalloc"); + features.push("jemalloc"); } if self.config.llvm_enabled() || kind == Kind::Check { - features.push_str(" llvm"); + features.push("llvm"); + } + // keep in sync with `bootstrap/compile.rs:rustc_cargo_env` + if self.config.rustc_parallel { + features.push("rustc_use_parallel_compiler"); } // If debug logging is on, then we want the default for tracing: @@ -743,10 +747,10 @@ impl Build { // if its unset, if debug_assertions is on, then debug_logging will also be on // as well as tracing *ignoring* this feature when debug_assertions is on if !self.config.rust_debug_logging { - features.push_str(" max_level_info"); + features.push("max_level_info"); } - features + features.join(" ") } /// Component directory that Cargo will produce output into (e.g. -- cgit 1.4.1-3-g733a5