Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spurious error when running build --stage 2 compiler/rustc #96859

Closed
wants to merge 1 commit into from

Commits on Jul 11, 2022

  1. Fix spurious error when running build --stage 2 compiler/rustc

    rust-lang#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.
    jyn514 committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    f707e72 View commit details
    Browse the repository at this point in the history