Skip to content

Commit

Permalink
Auto merge of #50022 - nrc:doc-analysis, r=mark-simulacrum
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Apr 18, 2018
2 parents ac3c228 + de34735 commit e0f9b32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,9 @@ impl<'a> Builder<'a> {
}
}

if mode == Mode::Libstd && self.config.extended && compiler.is_final_stage(self) {
if cmd == "build" && mode == Mode::Libstd
&& self.config.extended && compiler.is_final_stage(self)
{
cargo.env("RUSTC_SAVE_ANALYSIS", "api".to_string());
}

Expand Down

0 comments on commit e0f9b32

Please sign in to comment.