about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-03 04:54:02 +0000
committerbors <bors@rust-lang.org>2023-04-03 04:54:02 +0000
commitd0eed58a1e78eb1a25bb54076e4b0f7ea5ff7401 (patch)
treebfde5dadb1e4ed66f6c1b39c6db251a62af18e56
parent33289132ecc1805250f63801fded10fceb2300d8 (diff)
parent5d1ee66abedd083dcbc3ee691379e43430bc3197 (diff)
downloadrust-d0eed58a1e78eb1a25bb54076e4b0f7ea5ff7401.tar.gz
rust-d0eed58a1e78eb1a25bb54076e4b0f7ea5ff7401.zip
Auto merge of #108288 - ozkanonur:hotfix-90244, r=Mark-Simulacrum
fix `build --stage 2 compiler/rustc` panic

Skip assembling(which causes panic due to not found `.librustc.stamp` file) process
for stage3(since it has problems with sysroot) if full-bootstrap isn't used.

Resolves #90244
-rw-r--r--src/bootstrap/compile.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 67bd573a855..15708bb183e 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -1346,6 +1346,13 @@ impl Step for Assemble {
         // when not performing a full bootstrap).
         builder.ensure(Rustc::new(build_compiler, target_compiler.host));
 
+        // FIXME: For now patch over problems noted in #90244 by early returning here, even though
+        // we've not properly assembled the target sysroot. A full fix is pending further investigation,
+        // for now full bootstrap usage is rare enough that this is OK.
+        if target_compiler.stage >= 3 && !builder.config.full_bootstrap {
+            return target_compiler;
+        }
+
         for &backend in builder.config.rust_codegen_backends.iter() {
             if backend == "llvm" {
                 continue; // Already built as part of rustc