llvmPackages_{12,13,14,15,16,17,18,git}.libcxx: merge static libc++ab…#305876
Conversation
|
just simplified the ar command. validated that libc++.a hash is identical to the previous one. |
|
It would be nice to have a stdenv / cc-wrapper regression this for static linking. |
rrbutani
left a comment
There was a problem hiding this comment.
@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.
|
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
|
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-wrapperto test that can link (and run) hello world linking via$CC hello.o -lc++and$CC hello.o -l:libc++.ahttps://reviews.llvm.org/D96070#2552492
testing:
works on linux.
Description of changes
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-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.