Skip to content

Commit

Permalink
deps: V8 sync 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`
  • Loading branch information
refack authored and targos committed Oct 5, 2018
1 parent 34671d2 commit d172625
Show file tree
Hide file tree
Showing 5 changed files with 286 additions and 144 deletions.
43 changes: 35 additions & 8 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,56 @@

'openssl_fips%': '',

# Default to -O0 for debug builds.
'v8_optimized_debug%': 0,
# 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 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,

# Default to -O0 for debug builds.
'v8_optimized_debug': 0,

# 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': [
['GENERATOR=="ninja"', {
Expand Down
27 changes: 27 additions & 0 deletions deps/v8/gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,25 @@
'v8_untrusted_code_mitigations%': 'true',

'v8_enable_handle_zapping%': 1,

'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 @@ -167,6 +185,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 d172625

Please sign in to comment.