Skip to content

Commit 5cf9eff

Browse files
targosnodejs-github-bot
authored andcommitted
build: link V8 with atomic library
Closes: #290
1 parent 83fcd98 commit 5cf9eff

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)