Skip to content

Commit

Permalink
deps: sync V8 gypfiles with 7.1
Browse files Browse the repository at this point in the history
Enable v8_enable_embedded_builtins.
Reorder conditions proccessing for `run_mksnapshot`.

deps,v8: link with `atomic` for platforms lacking CAS
Fixes: nodejs/node-v8#81

Co-authored-by: Michaël Zasso <[email protected]>
PR-URL: #23423
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
  • Loading branch information
refack and targos committed Dec 6, 2018
1 parent 2360344 commit 5620727
Show file tree
Hide file tree
Showing 5 changed files with 340 additions and 108 deletions.
41 changes: 34 additions & 7 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,53 @@

'openssl_fips%': '',

# Some STL containers (e.g. std::vector) do not preserve ABI compatibility
# between debug and non-debug mode.
'disable_glibcxx_debug': 1,

# Don't use ICU data file (icudtl.dat) from V8, we use our own.
'icu_use_data_file_flag%': 0,

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.0',
'v8_embedder_string': '-node.1',

##### V8 defaults for Node.js #####

# Old time default, now explicitly stated.
'v8_use_snapshot': 'true',

# Refs: https://github.com/nodejs/node/issues/23122
# Refs: https://github.com/nodejs/node/issues/23167
# Enable compiler warnings when using V8_DEPRECATED apis.
'v8_deprecation_warnings': 1,
# Enable compiler warnings when using V8_DEPRECATE_SOON apis.
'v8_imminent_deprecation_warnings': 1,

# Enable disassembler for `--print-code` v8 options
'v8_enable_disassembler': 1,

# Don't bake anything extra into the snapshot.
'v8_use_external_startup_data%': 0,
'v8_use_external_startup_data': 0,

# https://github.com/nodejs/node/pull/22920/files#r222779926
'v8_enable_handle_zapping': 0,

# Disable V8 untrusted code mitigations.
# See https://github.com/v8/v8/wiki/Untrusted-code-mitigations
'v8_untrusted_code_mitigations': 'false',

# Some STL containers (e.g. std::vector) do not preserve ABI compatibility
# between debug and non-debug mode.
'disable_glibcxx_debug': 1,
# Still WIP in V8 7.1
'v8_enable_pointer_compression': 'false',

# Don't use ICU data file (icudtl.dat) from V8, we use our own.
'icu_use_data_file_flag%': 0,
# New in V8 7.1
'v8_enable_embedded_builtins': 'true',

# This is more of a V8 dev setting
# https://github.com/nodejs/node/pull/22920/files#r222779926
'v8_enable_fast_mksnapshot': 0,

##### end V8 defaults #####

'conditions': [
['target_arch=="arm64"', {
Expand Down
29 changes: 29 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 Expand Up @@ -106,7 +108,25 @@
# Currently set for node by common.gypi, avoiding default because of gyp file bug.
# Should be turned on only for debugging.
#'v8_enable_handle_zapping%': 0,

'v8_enable_pointer_compression%': 'false',

'v8_enable_embedded_builtins%': 'true',

'v8_perf_prof_unwinding_info%': 0,

'v8_enable_fast_mksnapshot%': 0,
},

'conditions': [
# V8's predicate inverted since we default to 'true' and set 'false' for unsupported cases.
# v8_use_snapshot && v8_current_cpu != "x86" && !is_aix && ( !is_win || is_clang)
['not (v8_use_snapshot=="true" and v8_target_arch !="ia32" and OS!="aix" and (OS!="win" or clang==1))', {
'variables': {
'v8_enable_embedded_builtins': 'false',
}
}],
],
'target_defaults': {
'conditions': [
['v8_embedder_string!=""', {
Expand Down Expand Up @@ -170,6 +190,15 @@
# ['v8_enable_handle_zapping==1', {
# 'defines': ['ENABLE_HANDLE_ZAPPING',],
# }],
['v8_enable_pointer_compression=="true"', {
'defines': ['V8_COMPRESS_POINTERS',],
}],
['v8_enable_embedded_builtins=="true"', {
'defines': [
'V8_EMBEDDED_BUILTINS',
'V8_EMBEDDED_BYTECODE_HANDLERS',
],
}],
], # conditions
'defines': [
'V8_GYP_BUILD',
Expand Down
3 changes: 1 addition & 2 deletions deps/v8/gypfiles/v8-monolithic.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
'v8_code': 1,
'v8_random_seed%': 314159265,
'v8_vector_stores%': 0,
'embed_script%': "",
'warmup_script%': "",
'v8_embed_script%': "",
'v8_extra_library_files%': [],
'v8_experimental_extra_library_files%': [],
'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
Expand Down
Loading

0 comments on commit 5620727

Please sign in to comment.