build: link libatomic on gcc or clang on linux#28532
build: link libatomic on gcc or clang on linux#28532marsam wants to merge 1 commit intonodejs:masterfrom
Conversation
|
@nodejs/node-gyp |
|
node-gyp only uses common.gypi so this change should be harmless in that respect. |
node.gyp
Outdated
There was a problem hiding this comment.
I'm having trouble understanding what problem this fixes. This is adding -latomic for all platforms when gcc is used, why? It is also removing -latomic on Macs when clang is used, but wasn't one of the bugs in the linked reports explicitly about needing -latomic with clang on Mac?
There was a problem hiding this comment.
technically clang always needs libatomic, but node only uses it on mac and linux for the v8 sigsegv handlers.
I don't believe it's ever needed on GCC, but I could be wrong.
There was a problem hiding this comment.
This is adding -latomic for all platforms when gcc is used, why?
I assumed this was implicitly required by the previous state. I've replace it with:
OS=="linux" and llvm_version!=0
to only add it on cllang+linux
but wasn't one of the bugs in the linked reports explicitly about needing -latomic with clang on Mac?
no, the #28231 mention clang+linux, it fails on clang+darwin NixOS/nixpkgs#64253 (comment)
technically clang always needs libatomic
not quite, libatomic is a gcc library. Clang by default is to be built to use it on Linux, and to use compiler-rt on darwin
004c76a to
9398c7b
Compare
devsnek
left a comment
There was a problem hiding this comment.
this will fail on mac+clang now
|
@devsnek I've tested on clang+darwin https://hatebin.com/vrlbbcwsia and gcc+linux (both with nix) |
|
@marsam on example error: |
|
AFAIK
I think adding |
|
I don't really know what any of the stuff you linked means, but you have an alternative to -latomic that doesn't break macos+clang, please include it in this pr. |
|
Ping @marsam |
|
@BridgeAR sorry for the delay, I'm not sure how to solve @devsnek's issue. I'm not familiar with gyp, and I could patch it downstream, hence I will not be working on this PR any further. Feel free to close it, thanks. |
|
Closed in favor of #30099 |
See: #28231 #28232
libatomic is a gcc library. Clang default is to be built to use it on Linux.
cc: @devsnek @addaleax
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes