| ... | ... | @@ -121,9 +121,11 @@ impl Step for ToolBuild { |
| 121 | 121 | cargo.env("RUSTC_WRAPPER", ccache); |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | | // Rustc tools (miri, clippy, cargo, rustfmt, rust-analyzer) |
| 124 | // RustcPrivate tools (miri, clippy, rustfmt, rust-analyzer) and cargo |
| 125 | 125 | // could use the additional optimizations. |
| 126 | | if self.mode == Mode::ToolRustcPrivate && is_lto_stage(&self.build_compiler) { |
| 126 | if is_lto_stage(&self.build_compiler) |
| 127 | && (self.mode == Mode::ToolRustcPrivate || self.path == "src/tools/cargo") |
| 128 | { |
| 127 | 129 | let lto = match builder.config.rust_lto { |
| 128 | 130 | RustcLto::Off => Some("off"), |
| 129 | 131 | RustcLto::Thin => Some("thin"), |