about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-08-07 10:56:05 +0000
committerbors <bors@rust-lang.org>2025-08-07 10:56:05 +0000
commitcd434309efcf5dc68b253e5ef6ba40c1c43711c9 (patch)
treeae2e38c93db6324c7d3459220233b73cda9b0644 /src/bootstrap
parent9b1a30e5e69e1537ef6eb6eb829eb47075206dea (diff)
parent7bc34622f037fedf3cf15c4a6beea1b40494cb2f (diff)
downloadrust-cd434309efcf5dc68b253e5ef6ba40c1c43711c9.tar.gz
rust-cd434309efcf5dc68b253e5ef6ba40c1c43711c9.zip
Auto merge of #144997 - BoxyUwU:bootstrap_bump, r=Mark-Simulacrum
bump bootstrap compiler to 1.90 beta

There were significantly less `cfg(bootstrap)` and `cfg(not(bootstrap))` this release. Presumably due to the fact that we change the bootstrap stage orderings to reduce the need for them and it was successful :pray:
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs20
-rw-r--r--src/bootstrap/src/core/builder/cargo.rs15
-rw-r--r--src/bootstrap/src/core/builder/mod.rs2
-rw-r--r--src/bootstrap/src/utils/helpers.rs23
4 files changed, 14 insertions, 46 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index b6199c74fb1..34d50b1dccd 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -291,13 +291,7 @@ impl Step for Cargotest {
             .args(builder.config.test_args())
             .env("RUSTC", builder.rustc(tested_compiler))
             .env("RUSTDOC", builder.rustdoc_for_compiler(tested_compiler));
-        add_rustdoc_cargo_linker_args(
-            &mut cmd,
-            builder,
-            tested_compiler.host,
-            LldThreads::No,
-            tested_compiler.stage,
-        );
+        add_rustdoc_cargo_linker_args(&mut cmd, builder, tested_compiler.host, LldThreads::No);
         cmd.delay_failure().run(builder);
     }
 
@@ -940,7 +934,7 @@ impl Step for RustdocTheme {
             .env("CFG_RELEASE_CHANNEL", &builder.config.channel)
             .env("RUSTDOC_REAL", builder.rustdoc_for_compiler(self.compiler))
             .env("RUSTC_BOOTSTRAP", "1");
-        cmd.args(linker_args(builder, self.compiler.host, LldThreads::No, self.compiler.stage));
+        cmd.args(linker_args(builder, self.compiler.host, LldThreads::No));
 
         cmd.delay_failure().run(builder);
     }
@@ -1120,13 +1114,7 @@ impl Step for RustdocGUI {
         cmd.env("RUSTDOC", builder.rustdoc_for_compiler(self.compiler))
             .env("RUSTC", builder.rustc(self.compiler));
 
-        add_rustdoc_cargo_linker_args(
-            &mut cmd,
-            builder,
-            self.compiler.host,
-            LldThreads::No,
-            self.compiler.stage,
-        );
+        add_rustdoc_cargo_linker_args(&mut cmd, builder, self.compiler.host, LldThreads::No);
 
         for path in &builder.paths {
             if let Some(p) = helpers::is_valid_test_suite_arg(path, "tests/rustdoc-gui", builder) {
@@ -1951,7 +1939,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
         }
 
         let mut hostflags = flags.clone();
-        hostflags.extend(linker_flags(builder, compiler.host, LldThreads::No, compiler.stage));
+        hostflags.extend(linker_flags(builder, compiler.host, LldThreads::No));
 
         let mut targetflags = flags;
 
diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs
index 1d0c9da694f..e10af2b55f9 100644
--- a/src/bootstrap/src/core/builder/cargo.rs
+++ b/src/bootstrap/src/core/builder/cargo.rs
@@ -115,7 +115,7 @@ impl Cargo {
             // No need to configure the target linker for these command types.
             Kind::Clean | Kind::Check | Kind::Format | Kind::Setup => {}
             _ => {
-                cargo.configure_linker(builder, mode);
+                cargo.configure_linker(builder);
             }
         }
 
@@ -209,7 +209,7 @@ impl Cargo {
 
     // FIXME(onur-ozkan): Add coverage to make sure modifications to this function
     // doesn't cause cache invalidations (e.g., #130108).
-    fn configure_linker(&mut self, builder: &Builder<'_>, mode: Mode) -> &mut Cargo {
+    fn configure_linker(&mut self, builder: &Builder<'_>) -> &mut Cargo {
         let target = self.target;
         let compiler = self.compiler;
 
@@ -264,12 +264,7 @@ impl Cargo {
             }
         }
 
-        // We use the snapshot compiler when building host code (build scripts/proc macros) of
-        // `Mode::Std` tools, so we need to determine the current stage here to pass the proper
-        // linker args (e.g. -C vs -Z).
-        // This should stay synchronized with the [cargo] function.
-        let host_stage = if mode == Mode::Std { 0 } else { compiler.stage };
-        for arg in linker_args(builder, compiler.host, LldThreads::Yes, host_stage) {
+        for arg in linker_args(builder, compiler.host, LldThreads::Yes) {
             self.hostflags.arg(&arg);
         }
 
@@ -279,10 +274,10 @@ impl Cargo {
         }
         // We want to set -Clinker using Cargo, therefore we only call `linker_flags` and not
         // `linker_args` here.
-        for flag in linker_flags(builder, target, LldThreads::Yes, compiler.stage) {
+        for flag in linker_flags(builder, target, LldThreads::Yes) {
             self.rustflags.arg(&flag);
         }
-        for arg in linker_args(builder, target, LldThreads::Yes, compiler.stage) {
+        for arg in linker_args(builder, target, LldThreads::Yes) {
             self.rustdocflags.arg(&arg);
         }
 
diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs
index f84565fccfd..e15941938f1 100644
--- a/src/bootstrap/src/core/builder/mod.rs
+++ b/src/bootstrap/src/core/builder/mod.rs
@@ -1623,7 +1623,7 @@ You have to build a stage1 compiler for `{}` first, and then use it to build a s
             cmd.arg("-Dwarnings");
         }
         cmd.arg("-Znormalize-docs");
-        cmd.args(linker_args(self, compiler.host, LldThreads::Yes, compiler.stage));
+        cmd.args(linker_args(self, compiler.host, LldThreads::Yes));
         cmd
     }
 
diff --git a/src/bootstrap/src/utils/helpers.rs b/src/bootstrap/src/utils/helpers.rs
index eb00ed566c2..451482717b6 100644
--- a/src/bootstrap/src/utils/helpers.rs
+++ b/src/bootstrap/src/utils/helpers.rs
@@ -404,9 +404,8 @@ pub fn linker_args(
     builder: &Builder<'_>,
     target: TargetSelection,
     lld_threads: LldThreads,
-    stage: u32,
 ) -> Vec<String> {
-    let mut args = linker_flags(builder, target, lld_threads, stage);
+    let mut args = linker_flags(builder, target, lld_threads);
 
     if let Some(linker) = builder.linker(target) {
         args.push(format!("-Clinker={}", linker.display()));
@@ -421,29 +420,16 @@ pub fn linker_flags(
     builder: &Builder<'_>,
     target: TargetSelection,
     lld_threads: LldThreads,
-    stage: u32,
 ) -> Vec<String> {
     let mut args = vec![];
     if !builder.is_lld_direct_linker(target) && builder.config.lld_mode.is_used() {
         match builder.config.lld_mode {
             LldMode::External => {
-                // cfg(bootstrap) - remove the stage 0 check after updating the bootstrap compiler:
-                // `-Clinker-features` has been stabilized.
-                if stage == 0 {
-                    args.push("-Zlinker-features=+lld".to_string());
-                } else {
-                    args.push("-Clinker-features=+lld".to_string());
-                }
+                args.push("-Clinker-features=+lld".to_string());
                 args.push("-Zunstable-options".to_string());
             }
             LldMode::SelfContained => {
-                // cfg(bootstrap) - remove the stage 0 check after updating the bootstrap compiler:
-                // `-Clinker-features` has been stabilized.
-                if stage == 0 {
-                    args.push("-Zlinker-features=+lld".to_string());
-                } else {
-                    args.push("-Clinker-features=+lld".to_string());
-                }
+                args.push("-Clinker-features=+lld".to_string());
                 args.push("-Clink-self-contained=+linker".to_string());
                 args.push("-Zunstable-options".to_string());
             }
@@ -465,9 +451,8 @@ pub fn add_rustdoc_cargo_linker_args(
     builder: &Builder<'_>,
     target: TargetSelection,
     lld_threads: LldThreads,
-    stage: u32,
 ) {
-    let args = linker_args(builder, target, lld_threads, stage);
+    let args = linker_args(builder, target, lld_threads);
     let mut flags = cmd
         .get_envs()
         .find_map(|(k, v)| if k == OsStr::new("RUSTDOCFLAGS") { v } else { None })