From 7fd3ce4b4b8fa57b43ebeceb36aceb49def23894 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Sat, 2 Nov 2024 09:58:24 +0300 Subject: [PATCH 1/2] make `download-rustc="if-unchanged"` default for library profile Signed-off-by: onur-ozkan --- src/bootstrap/defaults/config.library.toml | 3 +++ src/bootstrap/defaults/config.tools.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/defaults/config.library.toml b/src/bootstrap/defaults/config.library.toml index 5447565a4b04c..3d697be815658 100644 --- a/src/bootstrap/defaults/config.library.toml +++ b/src/bootstrap/defaults/config.library.toml @@ -8,6 +8,9 @@ bench-stage = 0 [rust] # This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower. incremental = true +# Download rustc from CI instead of building it from source. +# For stage > 1 builds, this cuts compile times significantly when there are no changes on "compiler" tree. +download-rustc = "if-unchanged" # Make the compiler and standard library faster to build, at the expense of a ~20% runtime slowdown. lto = "off" diff --git a/src/bootstrap/defaults/config.tools.toml b/src/bootstrap/defaults/config.tools.toml index efb56996bcd45..27c1d1cf26dac 100644 --- a/src/bootstrap/defaults/config.tools.toml +++ b/src/bootstrap/defaults/config.tools.toml @@ -4,7 +4,7 @@ # This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower. incremental = true # Download rustc from CI instead of building it from source. -# This cuts compile times by almost 60x, but means you can't modify the compiler. +# For stage > 1 builds, this cuts compile times significantly when there are no changes on "compiler" tree. # Using these defaults will download the stage2 compiler (see `download-rustc` # setting) and the stage2 toolchain should therefore be used for these defaults. download-rustc = "if-unchanged" From 329dacff1060bff211923adcf8f266735385fc4f Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Sat, 2 Nov 2024 10:18:09 +0300 Subject: [PATCH 2/2] add change entry for library profile update Signed-off-by: onur-ozkan --- src/bootstrap/src/utils/change_tracker.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs index b9cf8f0531698..0915ec15a2f15 100644 --- a/src/bootstrap/src/utils/change_tracker.rs +++ b/src/bootstrap/src/utils/change_tracker.rs @@ -290,4 +290,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[ severity: ChangeSeverity::Info, summary: "New option `llvm.offload` to control whether the llvm offload runtime for GPU support is built. Implicitly enables the openmp runtime as dependency.", }, + ChangeInfo { + change_id: 132494, + severity: ChangeSeverity::Info, + summary: "`download-rustc='if-unchanged'` is now a default option for library profile.", + }, ];