Skip to content
Permalink
Browse files

deps: sync V8 gypfiles with 7.1

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 <targos@protonmail.com>
PR-URL: #23423
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
  • Loading branch information...
refack and targos committed Aug 29, 2018
1 parent 2360344 commit 5620727f30e5867671d9ec03b77a36fb7ca7ff4f
Showing with 340 additions and 108 deletions.
  1. +34 −7 common.gypi
  2. +29 −0 deps/v8/gypfiles/features.gypi
  3. +1 −2 deps/v8/gypfiles/v8-monolithic.gyp
  4. +250 −82 deps/v8/gypfiles/v8.gyp
  5. +26 −17 deps/v8/gypfiles/v8_external_snapshot.gypi
@@ -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"', {
@@ -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`
@@ -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!=""', {
@@ -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',
@@ -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)',

0 comments on commit 5620727

Please sign in to comment.
You can’t perform that action at this time.