diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-09-11 08:26:00 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-11-08 15:53:35 +0100 |
commit | dda658cc0f785563fa847061cfd598a054de6420 (patch) | |
tree | 51ed629fcabb149220588da056ff3b4fc25ea6d6 | |
parent | 10af00630b205e1651db673654127ded7dae64fb (diff) | |
download | node-new-dda658cc0f785563fa847061cfd598a054de6420.tar.gz |
build,tools: update V8 gypfiles for V8 7.9
V8 can can no longer be built without snapshot.
PR-URL: https://github.com/nodejs/node/pull/30020
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
-rw-r--r-- | common.gypi | 56 | ||||
-rw-r--r-- | node.gyp | 1 | ||||
-rw-r--r-- | tools/v8_gypfiles/features.gypi | 13 | ||||
-rw-r--r-- | tools/v8_gypfiles/v8.gyp | 76 |
4 files changed, 84 insertions, 62 deletions
diff --git a/common.gypi b/common.gypi index c63b03399d..2e59636b17 100644 --- a/common.gypi +++ b/common.gypi @@ -43,9 +43,6 @@ ##### V8 defaults for Node.js ##### - # Old time default, now explicitly stated. - 'v8_use_snapshot': 1, - # Turn on SipHash for hash seed generation, addresses HashWick 'v8_use_siphash': 'true', @@ -76,52 +73,27 @@ # TODO(refack): make v8-perfetto happen 'v8_use_perfetto': 0, + 'v8_enable_pointer_compression': 0, + 'v8_enable_31bit_smis_on_64bit_arch': 0, + ##### end V8 defaults ##### 'conditions': [ ['OS == "win"', { 'os_posix': 0, 'v8_postmortem_support%': 0, + 'obj_dir': '<(PRODUCT_DIR)/obj', + 'v8_base': '<(PRODUCT_DIR)/lib/libv8_snapshot.a', }, { 'os_posix': 1, 'v8_postmortem_support%': 1, }], - ['v8_use_snapshot==1', { - 'conditions': [ - ['GENERATOR == "ninja"', { - 'obj_dir': '<(PRODUCT_DIR)/obj', - 'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_snapshot.a', - }, { - 'obj_dir%': '<(PRODUCT_DIR)/obj.target', - 'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a', - }], - ['OS == "win"', { - 'obj_dir': '<(PRODUCT_DIR)/obj', - 'v8_base': '<(PRODUCT_DIR)/lib/libv8_snapshot.a', - }], - ['OS == "mac"', { - 'obj_dir%': '<(PRODUCT_DIR)/obj.target', - 'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a', - }], - ], + ['GENERATOR == "ninja"', { + 'obj_dir': '<(PRODUCT_DIR)/obj', + 'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_snapshot.a', }, { - 'conditions': [ - ['GENERATOR == "ninja"', { - 'obj_dir': '<(PRODUCT_DIR)/obj', - 'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_nosnapshot.a', - }, { - 'obj_dir%': '<(PRODUCT_DIR)/obj.target', - 'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_nosnapshot.a', - }], - ['OS == "win"', { - 'obj_dir': '<(PRODUCT_DIR)/obj', - 'v8_base': '<(PRODUCT_DIR)/lib/libv8_nosnapshot.a', - }], - ['OS == "mac"', { - 'obj_dir%': '<(PRODUCT_DIR)/obj.target', - 'v8_base': '<(PRODUCT_DIR)/libv8_nosnapshot.a', - }], - ], + 'obj_dir%': '<(PRODUCT_DIR)/obj.target', + 'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a', }], ['openssl_fips != ""', { 'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)', @@ -130,6 +102,8 @@ }], ['OS=="mac"', { 'clang%': 1, + 'obj_dir%': '<(PRODUCT_DIR)/obj.target', + 'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a', }], ], }, @@ -334,6 +308,12 @@ }], ], }], + ['v8_enable_pointer_compression == 1', { + 'defines': ['V8_COMPRESS_POINTERS'], + }], + ['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', { + 'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'], + }], ['OS == "win"', { 'defines': [ 'WIN32', @@ -1,7 +1,6 @@ { 'variables': { 'v8_use_siphash%': 0, - 'v8_use_snapshot%': 1, 'v8_trace_maps%': 0, 'node_use_dtrace%': 'false', 'node_use_etw%': 'false', diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi index 602d6063f3..aa8ae2874b 100644 --- a/tools/v8_gypfiles/features.gypi +++ b/tools/v8_gypfiles/features.gypi @@ -198,10 +198,6 @@ # Variables from v8.gni - # Enable the snapshot feature, for fast context creation. - # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html - 'v8_use_snapshot%': 1, - # Enable ECMAScript Internationalization API. Enabling this feature will # add a dependency on the ICU library. 'v8_enable_i18n_support%': 1, @@ -287,13 +283,8 @@ # ['v8_enable_handle_zapping==1', { # 'defines': ['ENABLE_HANDLE_ZAPPING',], # }], - ['v8_use_snapshot==1', { - 'defines': ['V8_USE_SNAPSHOT',], - 'conditions': [ - ['v8_enable_snapshot_native_code_counters==1', { - 'defines': ['V8_SNAPSHOT_NATIVE_CODE_COUNTERS',], - }], - ], + ['v8_enable_snapshot_native_code_counters==1', { + 'defines': ['V8_SNAPSHOT_NATIVE_CODE_COUNTERS',], }], ['v8_enable_single_generation==1', { 'defines': ['V8_ENABLE_SINGLE_GENERATION',], diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 0ecfc7e945..a7971d683d 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -59,9 +59,13 @@ "<(V8_ROOT)/src/builtins/proxy-set-prototype-of.tq", "<(V8_ROOT)/src/builtins/proxy.tq", "<(V8_ROOT)/src/builtins/reflect.tq", + "<(V8_ROOT)/src/builtins/regexp-exec.tq", + "<(V8_ROOT)/src/builtins/regexp-match-all.tq", "<(V8_ROOT)/src/builtins/regexp-match.tq", "<(V8_ROOT)/src/builtins/regexp-replace.tq", + "<(V8_ROOT)/src/builtins/regexp-search.tq", "<(V8_ROOT)/src/builtins/regexp-source.tq", + "<(V8_ROOT)/src/builtins/regexp-split.tq", "<(V8_ROOT)/src/builtins/regexp-test.tq", "<(V8_ROOT)/src/builtins/regexp.tq", "<(V8_ROOT)/src/builtins/string.tq", @@ -131,6 +135,7 @@ ], 'outputs': [ '<(torque_output_root)/torque-generated/builtin-definitions-tq.h', + '<(torque_output_root)/torque-generated/interface-descriptors-tq.inc', '<(torque_output_root)/torque-generated/field-offsets-tq.h', '<(torque_output_root)/torque-generated/class-verifiers-tq.cc', '<(torque_output_root)/torque-generated/class-verifiers-tq.h', @@ -271,16 +276,7 @@ 'type': 'none', 'toolsets': ['target'], 'hard_dependency': 1, - 'conditions': [ - # The dependency on v8_base should come from a transitive - # dependency however the Android toolchain requires libv8_base.a - # to appear before libv8_snapshot.a so it's listed explicitly. - ['v8_use_snapshot==1', { - 'dependencies': ['v8_base', 'v8_snapshot'], - }, { - 'dependencies': ['v8_base', 'v8_init', 'v8_nosnapshot'], - }], - ] + 'dependencies': ['v8_base', 'v8_snapshot'], }, # v8_maybe_snapshot { 'target_name': 'v8_init', @@ -1488,7 +1484,6 @@ 'v8_enable_i18n_support=<(v8_enable_i18n_support)', 'v8_enable_verify_predictable=<(v8_enable_verify_predictable)', 'v8_target_cpu=<(v8_target_arch)', - 'v8_use_snapshot=<(v8_use_snapshot)', 'v8_use_siphash=<(v8_use_siphash)', 'v8_enable_embedded_builtins=<(v8_enable_embedded_builtins)', 'v8_enable_verify_csa=<(v8_enable_verify_csa)', @@ -1526,9 +1521,66 @@ 'toolsets': ['host', 'target'], }], ], + 'dependencies': ['run_torque'], 'variables': { 'heapobject_files': [ - '<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"postmortem-metadata.*?sources = ")', + '<(V8_ROOT)/src/objects/objects.h', + '<(V8_ROOT)/src/objects/objects-inl.h', + '<(V8_ROOT)/src/objects/allocation-site-inl.h', + '<(V8_ROOT)/src/objects/allocation-site.h', + '<(V8_ROOT)/src/objects/cell-inl.h', + '<(V8_ROOT)/src/objects/cell.h', + '<(V8_ROOT)/src/objects/code-inl.h', + '<(V8_ROOT)/src/objects/code.h', + '<(V8_ROOT)/src/objects/data-handler.h', + '<(V8_ROOT)/src/objects/data-handler-inl.h', + '<(V8_ROOT)/src/objects/descriptor-array.h', + '<(V8_ROOT)/src/objects/descriptor-array-inl.h', + '<(V8_ROOT)/src/objects/feedback-cell.h', + '<(V8_ROOT)/src/objects/feedback-cell-inl.h', + '<(V8_ROOT)/src/objects/fixed-array-inl.h', + '<(V8_ROOT)/src/objects/fixed-array.h', + '<(V8_ROOT)/src/objects/heap-number-inl.h', + '<(V8_ROOT)/src/objects/heap-number.h', + '<(V8_ROOT)/src/objects/heap-object-inl.h', + '<(V8_ROOT)/src/objects/heap-object.h', + '<(V8_ROOT)/src/objects/instance-type.h', + '<(V8_ROOT)/src/objects/js-array-inl.h', + '<(V8_ROOT)/src/objects/js-array.h', + '<(V8_ROOT)/src/objects/js-array-buffer-inl.h', + '<(V8_ROOT)/src/objects/js-array-buffer.h', + '<(V8_ROOT)/src/objects/js-objects-inl.h', + '<(V8_ROOT)/src/objects/js-objects.h', + '<(V8_ROOT)/src/objects/js-promise-inl.h', + '<(V8_ROOT)/src/objects/js-promise.h', + '<(V8_ROOT)/src/objects/js-regexp-inl.h', + '<(V8_ROOT)/src/objects/js-regexp.cc', + '<(V8_ROOT)/src/objects/js-regexp.h', + '<(V8_ROOT)/src/objects/js-regexp-string-iterator-inl.h', + '<(V8_ROOT)/src/objects/js-regexp-string-iterator.h', + '<(V8_ROOT)/src/objects/map.h', + '<(V8_ROOT)/src/objects/map.cc', + '<(V8_ROOT)/src/objects/map-inl.h', + '<(V8_ROOT)/src/objects/js-objects.cc', + '<(V8_ROOT)/src/objects/name.h', + '<(V8_ROOT)/src/objects/name-inl.h', + '<(V8_ROOT)/src/objects/oddball-inl.h', + '<(V8_ROOT)/src/objects/oddball.h', + '<(V8_ROOT)/src/objects/primitive-heap-object.h', + '<(V8_ROOT)/src/objects/primitive-heap-object-inl.h', + '<(V8_ROOT)/src/objects/scope-info.h', + '<(V8_ROOT)/src/objects/script.h', + '<(V8_ROOT)/src/objects/script-inl.h', + '<(V8_ROOT)/src/objects/shared-function-info.h', + '<(V8_ROOT)/src/objects/shared-function-info-inl.h', + '<(V8_ROOT)/src/objects/string.cc', + '<(V8_ROOT)/src/objects/string.h', + '<(V8_ROOT)/src/objects/string-comparator.cc', + '<(V8_ROOT)/src/objects/string-comparator.h', + '<(V8_ROOT)/src/objects/string-inl.h', + '<(V8_ROOT)/src/objects/struct.h', + '<(V8_ROOT)/src/objects/struct-inl.h', + '<(torque_output_root)/torque-generated/instance-types-tq.h', ], }, 'actions': [ |