-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Bootstrap assumes llvm-dwp is sibling of llvm-config instead of inside bindir #81949
Comments
Good catch! I wish we had tools to lint for this kind of thing in bootstrap, or at least some kind of testing; we consistently get this wrong quite often unfortunately. I'd be happy to see a PR to fix this. Otherwise it'll likely take some time for me to get to it. |
I think this is also something that dist should ignore when building with external LLVM, although I suspect rust's support for split DWARF won't handle that well as-is. |
bootstrap: Locate llvm-dwp based on llvm-config bindir Fixes rust-lang#81949. Tested by successfully building 1.50.0 pre-release, which is where I originally hit the issue (https://internals.rust-lang.org/t/rust-1-50-0-pre-release-testing/14012/4?u=dtolnay). Tested both with and without prebuilt LLVM. The check for dry_run is necessary in the non-prebuilt case because the llvm-config built by bootstrap won't exist yet.
bootstrap: Locate llvm-dwp based on llvm-config bindir Fixes rust-lang#81949. Tested by successfully building 1.50.0 pre-release, which is where I originally hit the issue (https://internals.rust-lang.org/t/rust-1-50-0-pre-release-testing/14012/4?u=dtolnay). Tested both with and without prebuilt LLVM. The check for dry_run is necessary in the non-prebuilt case because the llvm-config built by bootstrap won't exist yet.
bootstrap: Locate llvm-dwp based on llvm-config bindir Fixes rust-lang#81949. Tested by successfully building 1.50.0 pre-release, which is where I originally hit the issue (https://internals.rust-lang.org/t/rust-1-50-0-pre-release-testing/14012/4?u=dtolnay). Tested both with and without prebuilt LLVM. The check for dry_run is necessary in the non-prebuilt case because the llvm-config built by bootstrap won't exist yet.
bootstrap: Locate llvm-dwp based on llvm-config bindir Fixes rust-lang#81949. Tested by successfully building 1.50.0 pre-release, which is where I originally hit the issue (https://internals.rust-lang.org/t/rust-1-50-0-pre-release-testing/14012/4?u=dtolnay). Tested both with and without prebuilt LLVM. The check for dry_run is necessary in the non-prebuilt case because the llvm-config built by bootstrap won't exist yet.
The incorrect way: assuming
llvm-dwp
exists in the parent directory of the path provided forllvm-config
. In general these two paths cannot be assumed to have any relationship to one another.rust/src/bootstrap/compile.rs
Lines 1075 to 1079 in 87bacf2
The correct way: run
llvm-config --bindir
using the provided llvm-config, and pickllvm-dwp
inside of the directory that it returns. Bootstrap does this correctly elsewhere, such as for FileCheck:rust/src/bootstrap/lib.rs
Lines 669 to 671 in 87bacf2
The text was updated successfully, but these errors were encountered: