Skip to content

Commit de34735

Browse files
committed
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
1 parent 6b12d36 commit de34735

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
@@ -756,7 +756,9 @@ impl<'a> Builder<'a> {
756756
}
757757
}
758758

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

0 commit comments

Comments
 (0)