Skip to content

Commit

Permalink
build: link V8 with atomic library
Browse files Browse the repository at this point in the history
Closes: #290
  • Loading branch information
targos authored and nodejs-github-bot committed Oct 21, 2024
1 parent 27a8311 commit 70d6ae4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,9 @@
'dependencies': ['postmortem-metadata#target'],
}],
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
# to implement atomic memory access
['v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"]', {
# to implement atomic memory access.
# Clang needs it for some atomic operations (https://clang.llvm.org/docs/Toolchain.html#atomics-library).
['(OS=="linux" and clang==1) or (v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"])', {
'link_settings': {
'libraries': ['-latomic', ],
},
Expand Down

0 comments on commit 70d6ae4

Please sign in to comment.