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 @@ fn cargo(&self, } } - 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()); }