Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@
],
}],
['OS=="linux" and clang==1', {
'libraries': ['-latomic'],
'libraries': ['<!@(clang++ -print-file-name=libatomic.a)'],
}],
],
},
Expand Down
8 changes: 7 additions & 1 deletion tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1334,11 +1334,17 @@
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
# 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"])', {
['(OS!="linux" or clang!=1) and (v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"])', {
'link_settings': {
'libraries': ['-latomic', ],
},
}],
# Statically link libatomic for Linux Clang builds
['OS=="linux" and clang==1', {
'link_settings': {
'libraries': ['<!@(clang++ -print-file-name=libatomic.a)', ],
},
}],
],
}, # v8_base_without_compiler
{
Expand Down
Loading