Skip to content

rustbuild: --build doesn't actually work when you don't already have the stage0 compiler #42116

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

Closed
segevfiner opened this issue May 20, 2017 · 0 comments
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@segevfiner
Copy link
Contributor

I tried to build a different ABI/triplet than the one rustbuild automatically guesses by using the --build command line option. As suggested in README.md#specifying-an-abi, But it didn't work and failed with:

Segev@Segev-PC MINGW64 ~/rust
$ ./x.py build --build x86_64-pc-windows-msvc src/libtest
    Finished dev [unoptimized] target(s) in 0.7 secs


failed to execute command: "C:\\Users\\Segev\\prj\\rust\\msys64\\home\\Segev\\rust\\build\\x86_64-pc-windows-msvc\\stage0/bin\\rustc.exe" "--version" "--verbose"
error: The system cannot find the file specified. (os error 2)


Build completed unsuccessfully in 0:00:00

Setting "build" in cargo.toml works correctly.

The bootstrap.py script is responsible for downloading the stage0 compiler and building bootstrap (rustbuild), but it only checks which stage0 to download and use in config.toml/config.mk. It doesn't look at the command line at all for deciding this, which I think is the cause for this. See: bootstrap.py:410-545.

@Mark-Simulacrum Mark-Simulacrum added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 23, 2017
segevfiner added a commit to segevfiner/rust that referenced this issue Jul 21, 2017
This makes the --build argument also apply for the downloading of the
stage0 toolchain and building rustbuild.

Fixes rust-lang#42116
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 24, 2017
bors added a commit that referenced this issue Jul 25, 2017
…anhs

rustbuild: Fix the --build argument to bootstrap.py

This makes the --build argument also apply for the downloading of the stage0 toolchain and building rustbuild.

Fixes #42116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

2 participants