Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix LLVM libunwind build for non-musl targets #88483

Merged
merged 1 commit into from
Sep 3, 2021

Conversation

jethrogb
Copy link
Contributor

Broken in #85600. AFAICT, only musl, mingw, and wasm should use the “self-contained” logic in rustbuild.

@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 Aug 30, 2021
@jethrogb jethrogb force-pushed the jb/llvm-libunwind-self-contained branch from c58dcfb to 446c429 Compare August 30, 2021 10:46
@petrochenkov
Copy link
Contributor

petrochenkov commented Aug 30, 2021

cc @12101111

only musl, mingw, and wasm should use the “self-contained” logic in rustbuild.

This was the initial set, but others could be added as well when reasonable.

For example, does fortanix-sgx links to some kind of libc?
Or can it link to some "system" libunwind instead of the shipped one?

@jethrogb
Copy link
Contributor Author

jethrogb commented Aug 30, 2021

does fortanix-sgx links to some kind of libc?

No

Or can it link to some "system" libunwind instead of the shipped one?

Well I suppose you could always swap it out for something you build yourself if you provide the right interface? The only things required to build & link for this target is distributed by the Rust project, there are no other build dependencies and there are no other competing toolchains.

@petrochenkov
Copy link
Contributor

I see.
So, the main alternative is to indeed put libunwind.a to the self-contained directory and turn the -Cself-contained flag to true by default for fortanix-sgx targets (like #85600 (comment) suggests), so that the shipped libraries can be easily disabled.

The choice probably doesn't matters from practical point of view, fortanix-sgx and fuchsia are targets for which we can change details like this at any moment, so it's mostly a matter of internal consistency right now.

@jethrogb
Copy link
Contributor Author

jethrogb commented Sep 1, 2021

How to move forward on this? Nightly builds for this target have been broken for the better part of a week.

@petrochenkov
Copy link
Contributor

r? @petrochenkov @bors r+

@bors
Copy link
Contributor

bors commented Sep 1, 2021

📌 Commit 446c429 has been approved by petrochenkov

@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 Sep 1, 2021
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Sep 2, 2021
…tained, r=petrochenkov

Fix LLVM libunwind build for non-musl targets

Broken in rust-lang#85600. AFAICT, [only musl, mingw, and wasm](https://github.com/rust-lang/rust/blob/673d0db5e393e9c64897005b470bfeb6d5aec61b/compiler/rustc_target/src/spec/crt_objects.rs#L128-L132) should use the “self-contained” logic in rustbuild.
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 3, 2021
Rollup of 7 pull requests

Successful merges:

 - rust-lang#88202 (Add an example for deriving PartialOrd on enums)
 - rust-lang#88483 (Fix LLVM libunwind build for non-musl targets)
 - rust-lang#88507 (Add test case for using `slice::fill` with MaybeUninit)
 - rust-lang#88557 (small const generics cleanup)
 - rust-lang#88579 (remove redundant / misplaced sentence from docs)
 - rust-lang#88610 (Update outdated docs of array::IntoIter::new.)
 - rust-lang#88613 (Update primitive docs for rust 2021.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3ce205a into rust-lang:master Sep 3, 2021
@rustbot rustbot added this to the 1.56.0 milestone Sep 3, 2021
# for free to join this conversation on GitHub. Already have an account? # 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.

6 participants