Skip to content

Commit e0f9b32

Browse files
committed
Auto merge of #50022 - nrc:doc-analysis, r=mark-simulacrum
Only emit save-analysis data for `cargo build` tasks Previously, we were emittinng analysis data for all tasks, including `doc`. That meant we got two sets of save-analysis data, one from the normal build and one from the docs. That means indexing with the RLS took twice as long and made downloads larger and build times longer. cc rust-lang/rls#826 r? @Mark-Simulacrum
2 parents ac3c228 + de34735 commit e0f9b32

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bootstrap/builder.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,9 @@ impl<'a> Builder<'a> {
755755
}
756756
}
757757

758-
if mode == Mode::Libstd && self.config.extended && compiler.is_final_stage(self) {
758+
if cmd == "build" && mode == Mode::Libstd
759+
&& self.config.extended && compiler.is_final_stage(self)
760+
{
759761
cargo.env("RUSTC_SAVE_ANALYSIS", "api".to_string());
760762
}
761763

0 commit comments

Comments
 (0)