Skip to content

Commit 92841f3

Browse files
targosnodejs-github-bot
authored andcommitted
build: link V8 with atomic library
Closes: #290
1 parent bb87d9f commit 92841f3

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
@@ -1239,8 +1239,9 @@
12391239
'dependencies': ['postmortem-metadata#target'],
12401240
}],
12411241
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
1242-
# to implement atomic memory access
1243-
['v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"]', {
1242+
# to implement atomic memory access.
1243+
# Clang needs it for some atomic operations (https://clang.llvm.org/docs/Toolchain.html#atomics-library).
1244+
['(OS=="linux" and clang==1) or (v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"])', {
12441245
'link_settings': {
12451246
'libraries': ['-latomic', ],
12461247
},

0 commit comments

Comments
 (0)