tools: link more targets with libatomic

Signed-off-by: Aviv Keller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/66851
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
Aviv Keller authored and avivkeller committed 2026-11-26 13:15:50 -07:00
1 parent 3872251a16
commit 421ee55145
1 file changed
+8
+8
View File
@@ -1866,6 +1866,14 @@
['node_shared_abseil=="false"', {
'dependencies': ['abseil.gyp:abseil'],
}],
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
# to implement atomic memory access.
# Clang needs it for some atomic operations (https://clang.llvm.org/docs/Toolchain.html#atomics-library).
['(OS=="linux" and clang==1) or (v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"])', {
'link_settings': {
'libraries': ['-latomic', ],
},
}],
],
'defines!': [
'BUILDING_V8_SHARED=1',