From cd935cb76a08d8692709d40f2ff1f3a5103e8eb8 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Perennou Date: Mon, 23 Mar 2020 15:28:02 +0100 Subject: [PATCH] rustbuild: only pass -Zconfig-profile if we're not self bootstraping This option is now stable thus our cargo will reject it Fixes #69975 Signed-off-by: Marc-Antoine Perennou --- src/bootstrap/builder.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index e4b57cddfb891..eb0199fd020dd 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -725,7 +725,11 @@ impl<'a> Builder<'a> { self.clear_if_dirty(&my_out, &rustdoc); } - cargo.env("CARGO_TARGET_DIR", &out_dir).arg(cmd).arg("-Zconfig-profile"); + cargo.env("CARGO_TARGET_DIR", &out_dir).arg(cmd); + + if !self.local_rebuild { + cargo.arg("-Zconfig-profile"); + } let profile_var = |name: &str| { let profile = if self.config.rust_optimize { "RELEASE" } else { "DEV" };