Skip to content

Commit e87abdb

Browse files
committed
bootstrap: when we detect travis-ci or appveyor, use 16 codegen-units when building stage0.
1 parent a7170b0 commit e87abdb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bootstrap/builder.rs

+6
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,12 @@ impl<'a> Builder<'a> {
778778
if cmd != "bench" {
779779
cargo.arg("--release");
780780
}
781+
if compiler.stage == 0 &&
782+
(env::var_os("TRAVIS").is_some() || env::var_os("APPVEYOR").is_some()) {
783+
// If we run on travis-ci or appveyor, build stage0 with
784+
// several codegenunits for lower build times.
785+
cargo.env("RUSTC_CODEGEN_UNITS", "16");
786+
}
781787
}
782788

783789
if self.config.locked_deps {

0 commit comments

Comments
 (0)