Skip to content

Commit d58315f

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

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

0 commit comments

Comments
 (0)