From f8b67ff5df3a9b0fcd237ebc5db5c74410169703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Thu, 11 Feb 2021 00:00:00 +0000 Subject: [PATCH] Try building rustc with codegen-units=5 --- src/bootstrap/builder.rs | 5 ++++- src/ci/run.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 8fddd8cba08de..5871d26004713 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1444,7 +1444,10 @@ impl<'a> Builder<'a> { } match (mode, self.config.rust_codegen_units_std, self.config.rust_codegen_units) { - (Mode::Std, Some(n), _) | (_, _, Some(n)) => { + (Mode::Rustc, _, Some(n)) => { + cargo.env(profile_var("CODEGEN_UNITS"), n.to_string()); + } + (Mode::Std, Some(n), _) => { cargo.env(profile_var("CODEGEN_UNITS"), n.to_string()); } _ => { diff --git a/src/ci/run.sh b/src/ci/run.sh index 1958b6ee41d7f..6dfb64ccae84b 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -52,6 +52,7 @@ RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-manage-submodules" RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-locked-deps" RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-cargo-native-static" RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-units-std=1" +RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-units=5" # Only produce xz tarballs on CI. gz tarballs will be generated by the release # process by recompressing the existing xz ones. This decreases the storage