Skip to content

Commit 89f661d

Browse files
committed
build: link V8 with atomic library
Closes: nodejs/node-v8#290 PR-URL: #55014 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent 7e87520 commit 89f661d

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
@@ -1267,8 +1267,9 @@
12671267
'dependencies': ['postmortem-metadata#target'],
12681268
}],
12691269
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
1270-
# to implement atomic memory access
1271-
['v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"]', {
1270+
# to implement atomic memory access.
1271+
# Clang needs it for some atomic operations (https://clang.llvm.org/docs/Toolchain.html#atomics-library).
1272+
['(OS=="linux" and clang==1) or (v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"])', {
12721273
'link_settings': {
12731274
'libraries': ['-latomic', ],
12741275
},

0 commit comments

Comments
 (0)