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
llvmPackages_{12,13,14,15,16,17,18,git}.libcxx: merge static libc++ab… #305876
Conversation
d348af3
to
da6f11e
Compare
just simplified the ar command. validated that libc++.a hash is identical to the previous one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine to me.
It would be nice to have a stdenv / cc-wrapper regression this for static linking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghostofannalee Thank you for your work on this.
Apologies if you've already addressed this elsewhere: do you know if LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY
(available in LLVM 7+) is sufficient for this?
I haven't tested ^ yet but it seems to do what we want.
da6f11e
to
86687b0
Compare
updated to use |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/tracking-down-what-broke-boehm-gc-static-aarch64-apple-darwin/42234/4 |
Looks like there's eval errors, idk what the errors are since I'm on mobile but they need to be fixed. |
blurg. LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY doesn't seem to work on LLVM < 16 so going to revert to the MRI script which works for LLVM 12+. added some tests but going to mark as draft until i have tests and update ready. missed this staging cycle anyway. |
…o libc++.a merge libc++abi.a, if it exists, into libc++.a so static builds behave similar to shared object builds and only require using -lc++
test that shared and static libc++ can be linked without needing to specify libc++abi
86687b0
to
188c149
Compare
ok. moved back to the ar MRI script as that is supported from LLVM12+, made freebsd work if libcxxrt.a exists (currently it doesn't exist but tested with #306238). when #306027 merges will need to resolve the merge conflict. unfortunately, the MRI script is kind of gross but can't just do aarch64-linux tests.cc-wrapper fails due to bug #285016 |
I am wondering whether we should still use |
@Ericson2314 by "fix it" do you mean backporting |
this is more than i have time to deal with. |
I certainly didn't mean for upstream changes to be a blocker for this PR. I meant
|
…i.a into libc++.a
https://discourse.nixos.org/t/tracking-down-what-broke-boehm-gc-static-aarch64-apple-darwin/42234/1
merge libc++abi.a, if it exists, into libc++.a so static builds behave similar to shared object builds and only require using -lc++
add a test in
tests.cc-wrapper
to test that can link (and run) hello world linking via$CC hello.o -lc++
and$CC hello.o -l:libc++.a
https://reviews.llvm.org/D96070#2552492
testing:
works on linux.
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.