Skip to content

Commit

Permalink
deps,v8: link with atomic for platforms lacking CAS
Browse files Browse the repository at this point in the history
  • Loading branch information
refack authored and targos committed Oct 17, 2018
1 parent bae296c commit ce4a0cc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deps/v8/gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
'variables': {
'v8_target_arch%': '<(target_arch)',

'v8_current_cpu%': '<(target_arch)',

# Emulate GN variables
'conditions': [
['OS=="android"', { # GYP reverts OS to linux so use `-D OS=android`
Expand Down
12 changes: 12 additions & 0 deletions deps/v8/gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,18 @@
'../src/builtins/builtins-intl-gen.cc',
],
}],
# Platforms that don't have Compare-And-Swap support need to link atomic
# library to implement atomic memory access
[ 'v8_current_cpu == "mips" or v8_current_cpu == "mipsel" or '
'v8_current_cpu == "mips64" or v8_current_cpu == "mips64el" or '
'v8_current_cpu == "ppc" or v8_current_cpu == "ppc64" or '
'v8_current_cpu == "s390" or v8_current_cpu == "s390x"',
{
'link_settings': {
'libraries': [ '-latomic', ],
},
},
],
],
}, # v8_initializers
{
Expand Down

0 comments on commit ce4a0cc

Please sign in to comment.