Skip to content

Commit d48a069

Browse files
committed
build: link V8 with atomic library
Closes: nodejs/node-v8#290
1 parent 8913cec commit d48a069

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/v8_gypfiles/v8.gyp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,8 +1222,9 @@
12221222
'dependencies': ['postmortem-metadata#target'],
12231223
}],
12241224
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
1225-
# to implement atomic memory access
1226-
['v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"]', {
1225+
# to implement atomic memory access.
1226+
# Clang needs it for some atomic operations (https://clang.llvm.org/docs/Toolchain.html#atomics-library).
1227+
['(OS=="linux" and clang==1) or (v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"])', {
12271228
'link_settings': {
12281229
'libraries': ['-latomic', ],
12291230
},

0 commit comments

Comments
 (0)