From 78fdbfc4008b52bcce201fd589ed84d2abb0419d Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 5 Jul 2017 13:51:34 -0700 Subject: [PATCH] rustbuild: Only -Zsave-analysis for libstd Don't pass the flag when we're compiling the compiler or other related tools --- src/bootstrap/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 69b0c4a2756a..5a3785b1ed63 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -482,7 +482,9 @@ impl Build { } } - if self.config.extended && compiler.is_final_stage(self) { + if mode == Mode::Libstd && + self.config.extended && + compiler.is_final_stage(self) { cargo.env("RUSTC_SAVE_ANALYSIS", "api".to_string()); }