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

Package LLVM libs for the target rather than the build host #87191

Merged
merged 2 commits into from
Jul 23, 2021

Conversation

adamgemmell
Copy link
Contributor

Fixes #85250

dist.rs uses, in the rust-dev stage, llvm-config --libfiles to get a list of the LLVM library files built but of course only for the build host. If the target differs we want to package lib files from the target's build tree instead. This is done by splitting/rejoining the paths on their build directories.

At the moment tree on the LLVM build directories seems to give almost identical output, but of course this might not be the case in the future. If a file is missing in the target's build tree then this stage will error in the builder.install() call. If the target build tree has an extra file then it silently won't be copied and we'll get a linker error when building using this artifact (via download-ci-llvm = "if-available"), though we would have received a linker error anyway without this change.

There was also a typo in the example config around this option.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 16, 2021
@Mark-Simulacrum
Copy link
Member

Seems OK. We can always iterate further, but this still seems an improvement over the previous state. Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jul 23, 2021

📌 Commit 24254d6 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 23, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 23, 2021
Rollup of 14 pull requests

Successful merges:

 - rust-lang#86410 (VecMap::get_value_matching should return just one element)
 - rust-lang#86790 (Document iteration order of `retain` functions)
 - rust-lang#87171 (Remove Option from BufWriter)
 - rust-lang#87175 (Stabilize `into_parts()` and `into_error()`)
 - rust-lang#87185 (Fix panics on Windows when the build was cancelled)
 - rust-lang#87191 (Package LLVM libs for the target rather than the build host)
 - rust-lang#87255 (better support for running libcore tests with Miri)
 - rust-lang#87266 (Add testcase for 87076)
 - rust-lang#87283 (Add `--codegen-backends=foo,bar` configure flag)
 - rust-lang#87322 (fix: clarify suggestion that `&T` must refer to `T: Sync` for `&T: Send`)
 - rust-lang#87358 (Fix `--dry-run` when download-ci-llvm is set)
 - rust-lang#87380 (Don't default to `submodules = true` unless the rust repo has a .git directory)
 - rust-lang#87398 (Add test for fonts used for module items)
 - rust-lang#87412 (Add missing article)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit aca83f1 into rust-lang:master Jul 23, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 23, 2021
@adamgemmell adamgemmell deleted the dev/llvm-lib-package branch July 18, 2022 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x.py dist cross-compile packages the wrong LLVM build
5 participants