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

Rerun bootstrap's build script when RUSTC changes #93723

Merged
merged 1 commit into from
Feb 7, 2022

Commits on Feb 7, 2022

  1. Rerun bootstrap's build script when RUSTC changes

    Previously, rustbuild would give strange errors if you tried to reuse the same build directory under two names:
    
    ```
    $ mkdir tmp && cd tmp
    $ ../x.py check
    Building rustbuild
        Finished dev [unoptimized] target(s) in 35.27s
    Checking stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    ^C
    $ cd ..
    $ mv tmp/build build
    $ ./x.py check
    Building rustbuild
       Compiling bootstrap v0.0.0 (/home/jnelson/rust-lang/rust/src/bootstrap)
        Finished dev [unoptimized] target(s) in 11.18s
    
    failed to execute command: "/home/jnelson/rust-lang/rust/tmp/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" "--target" "x86_64-unknown-linux-gnu" "--print" "target-libdir"
    error: No such file or directory (os error 2)
    ```
    
    This fixes the error. Reusing the same build directory is useful if you want to test path-things in
    bootstrap itself, without having to recompile it each time.
    
    For good measure, this also reruns the build script when PATH changes.
    jyn514 committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    b5b2150 View commit details
    Browse the repository at this point in the history