Skip to content

Commit

Permalink
rustbuild: Build libstd with ThinLTO
Browse files Browse the repository at this point in the history
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 rust-lang#45320
  • Loading branch information
alexcrichton committed Oct 25, 2017
1 parent f764eaf commit 578feb5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,12 +617,13 @@ impl<'a> Builder<'a> {
if self.is_very_verbose() {
cargo.arg("-v");
}
// FIXME: cargo bench does not accept `--release`
if self.config.rust_optimize && cmd != "bench" {
cargo.arg("--release");
if self.config.rust_optimize {
// FIXME: cargo bench does not accept `--release`
if cmd != "bench" {
cargo.arg("--release");
}

if mode != Mode::Libstd &&
self.config.rust_codegen_units.is_none() &&
if self.config.rust_codegen_units.is_none() &&
self.build.is_rust_llvm(compiler.host)

{
Expand Down

0 comments on commit 578feb5

Please sign in to comment.