Skip to content

Commit 9a26863

Browse files
committed
Apply LTO when building rustc tools
1 parent f06e5c1 commit 9a26863

File tree

1 file changed

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

1 file changed

+3
-1
lines changed

Diff for: src/bootstrap/src/core/build_steps/tool.rs

+3-1
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+
// Rustc 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)