Skip to content

Commit 578feb5

Browse files
committed
rustbuild: Build libstd with ThinLTO
This commit moves the standard library to get compiled with multiple codegen units and ThinLTO like the compiler itself. This I would hope is the last major step towards closing out #45320
1 parent f764eaf commit 578feb5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/bootstrap/builder.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -617,12 +617,13 @@ impl<'a> Builder<'a> {
617617
if self.is_very_verbose() {
618618
cargo.arg("-v");
619619
}
620-
// FIXME: cargo bench does not accept `--release`
621-
if self.config.rust_optimize && cmd != "bench" {
622-
cargo.arg("--release");
620+
if self.config.rust_optimize {
621+
// FIXME: cargo bench does not accept `--release`
622+
if cmd != "bench" {
623+
cargo.arg("--release");
624+
}
623625

624-
if mode != Mode::Libstd &&
625-
self.config.rust_codegen_units.is_none() &&
626+
if self.config.rust_codegen_units.is_none() &&
626627
self.build.is_rust_llvm(compiler.host)
627628

628629
{

0 commit comments

Comments
 (0)