From e87abdbf447ad5474ce81c5f11ffc9fa96740f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 8 Mar 2018 16:21:08 +0100 Subject: [PATCH] bootstrap: when we detect travis-ci or appveyor, use 16 codegen-units when building stage0. --- src/bootstrap/builder.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index fab7a2b3fcc5c..34efca27f14f6 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -778,6 +778,12 @@ impl<'a> Builder<'a> { if cmd != "bench" { cargo.arg("--release"); } + if compiler.stage == 0 && + (env::var_os("TRAVIS").is_some() || env::var_os("APPVEYOR").is_some()) { + // If we run on travis-ci or appveyor, build stage0 with + // several codegenunits for lower build times. + cargo.env("RUSTC_CODEGEN_UNITS", "16"); + } } if self.config.locked_deps {