Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix spurious error when running
build --stage 2 compiler/rustc
#89759 introduced a panic: ``` Assembling stage3 compiler (x86_64-apple-darwin) thread 'main' panicked at 'fs::read(stamp) failed with No such file or directory (os error 2) ("/Users/user/rust2/build/x86_64-apple-darwin/stage2-rustc/x86_64-apple-darwin/release/.librustc.stamp")', src/bootstrap/lib.rs:1296:24 ``` This wasn't actually a bug in that PR - the problem was that `x build --stage 3` is broken, and has been for quite some time, even ignoring the stamp file error: ``` thread 'main' panicked at 'src.symlink_metadata() failed with No such file or directory (os error 2) ("failed to determine metadata of /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/rustc-main")', src/bootstrap/lib.rs:1414:24 ``` It needs to take into account whether the artifacts from stage1 are being reused, rather than blindly assuming rustc will be recompiled. Doing so is kind of annoying, because it requires knowing the target the compiler is being built for. Instead, just revert to the old behavior of `build --stage 2 compiler/rustc`, which avoids trying to create the sysroot in the first place.
- Loading branch information