Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 1c4fbb0

Browse files
committed
Auto merge of rust-lang#139588 - Kobzol:rust-analyzer-opt, r=<try>
Apply LTO when building rust-analyzer Trying if LTO/PGO can help RA's performance, and by how much. CC `@Veykril` I realized that we don't even do LTO for Rust Analyzer, that could be a very low hanging fruit to improve its performance 😅 try-job: dist-x86_64-linux
2 parents 48f89e7 + 257d63f commit 1c4fbb0

File tree

1 file changed

+3
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+3
-1
lines changed

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ impl Step for ToolBuild {
148148
&self.extra_features,
149149
);
150150

151-
if path.ends_with("/rustdoc") &&
151+
// Rusc tools (miri, clippy, cargo, rustfmt, rust-analyzer)
152+
// could use the additional optimizations.
153+
if self.mode == Mode::ToolRustc &&
152154
// rustdoc is performance sensitive, so apply LTO to it.
153155
is_lto_stage(&self.compiler)
154156
{

0 commit comments

Comments
 (0)