Skip to content

[rustbuild] x.py build --stage 1 src/rustc --host=$HOST errors #38037

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
japaric opened this issue Nov 27, 2016 · 2 comments
Closed

[rustbuild] x.py build --stage 1 src/rustc --host=$HOST errors #38037

japaric opened this issue Nov 27, 2016 · 2 comments
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@japaric
Copy link
Member

japaric commented Nov 27, 2016

with:

(In this example: BUILD = x86_64-unknown-linux-gnu and HOST = arm-unknown-linux-gnueabi)

Building stage0 std artifacts (x86_64-unknown-linux-gnu -> arm-unknown-linux-gnueabi)
(..)
Building stage0 test artifacts (x86_64-unknown-linux-gnu -> arm-unknown-linux-gnueabi)
(..)
Building LLVM for arm-unknown-linux-gnueabi
(..)
ninja: error: '/home/japaric/build/x86_64-unknown-linux-gnu/llvm/bin/llvm-tblgen', needed by 'include/llvm/IR/Attributes.inc.tmp', missing and no known rule to make it

when configured with configure --enable-rustbuild --host=$HOST or with configure --enable-rustbuild --host=$HOST --llvm-root=/usr.

I think this is because rustbuild tries to use the llvm-tblgen that's supposed to be generated by building LLVM for $BUILD but rusbuild nevers builds LLVM for $BUILD in this case.

cc @alexcrichton

@japaric japaric added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Nov 27, 2016
@japaric
Copy link
Member Author

japaric commented Nov 27, 2016

Workaround

Call: x.py build --stage 1 src/llvm --host=$BUILD before x.py build --stage 1 src/rustc --host=$HOST.

alexcrichton added a commit to alexcrichton/rust that referenced this issue Nov 28, 2016
We use the host's tblgen so we need to be sure to always build the host first.

Closes rust-lang#38037
@alexcrichton
Copy link
Member

Fixed in #38050

bors added a commit that referenced this issue Dec 2, 2016
rustbuild: Cross-compiled LLVM depens on host

We use the host's tblgen so we need to be sure to always build the host first.

Closes #38037
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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