From a816fa185b42bc1bd73cd241be27121dcc5b784b Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 9 Sep 2019 10:22:24 -0700 Subject: Move handling of `RUSTC_PARALLEL_COMPILER` to `compile.rs` No longer needs to live in `rustc.rs` --- src/bootstrap/bin/rustc.rs | 4 ---- src/bootstrap/compile.rs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src/bootstrap') diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 8c460c59f07..b71119cc57c 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -170,10 +170,6 @@ fn main() { cmd.arg("-Z").arg("force-unstable-if-unmarked"); } - if env::var_os("RUSTC_PARALLEL_COMPILER").is_some() { - cmd.arg("--cfg").arg("parallel_compiler"); - } - if verbose > 1 { eprintln!( "rustc command: {:?}={:?} {:?}", diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index dc0961d16e8..6ea32edfb20 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -480,7 +480,7 @@ pub fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo) { cargo.env("CFG_DEFAULT_LINKER", s); } if builder.config.rustc_parallel { - cargo.env("RUSTC_PARALLEL_COMPILER", "1"); + cargo.rustflag("--cfg=parallel_compiler"); } if builder.config.rust_verify_llvm_ir { cargo.env("RUSTC_VERIFY_LLVM_IR", "1"); -- cgit 1.4.1-3-g733a5