Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update V8 to 6.6 #19201

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 11 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,12 @@ ifdef JOBS
PARALLEL_ARGS = -j $(JOBS)
endif

ifdef QUICKCHECK
QUICKCHECK_ARG := --quickcheck
endif

ifdef ENABLE_V8_TAP
TAP_V8 := --junitout $(PWD)/v8-tap.xml
TAP_V8_INTL := --junitout $(PWD)/v8-intl-tap.xml
TAP_V8_BENCHMARKS := --junitout $(PWD)/v8-benchmarks-tap.xml
endif

V8_BUILD_OPTIONS += GYPFLAGS="-Dclang=0"
V8_TEST_OPTIONS = $(V8_EXTRA_TEST_OPTIONS)
ifdef DISABLE_V8_I18N
V8_BUILD_OPTIONS += i18nsupport=off
Expand Down Expand Up @@ -96,7 +91,7 @@ $(NODE_G_EXE): config.gypi out/Makefile

out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \
deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \
deps/v8/gypfiles/features.gypi deps/v8/src/v8.gyp node.gyp \
deps/v8/gypfiles/features.gypi deps/v8/gypfiles/v8.gyp node.gyp \
config.gypi
$(PYTHON) tools/gyp_node.py -f make

Expand Down Expand Up @@ -233,8 +228,7 @@ endif
# Rebuilds deps/v8 as a git tree, pulls its third-party dependencies, and
# builds it.
v8:
tools/make-v8.sh
$(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)
tools/make-v8.sh $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)

.PHONY: jstest
jstest: build-addons build-addons-napi ## Runs addon tests and JS tests
Expand Down Expand Up @@ -569,31 +563,22 @@ test-with-async-hooks:
ifneq ("","$(wildcard deps/v8/tools/run-tests.py)")
# Related CI job: node-test-commit-v8-linux
test-v8: v8 ## Runs the V8 test suite on deps/v8.
# Performs a full test unless QUICKCHECK is specified.
# Note that we cannot run the tests in deps/v8 directly without rebuilding a
# git tree and using gclient to pull the third-party dependencies, which is
# done by the `v8` target.
deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \
--mode=$(BUILDTYPE_LOWER) $(V8_TEST_OPTIONS) $(QUICKCHECK_ARG) \
--no-presubmit \
--shell-dir=$(PWD)/deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) \
$(TAP_V8)
git clean -fdxq -- deps/v8
deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) \
--mode=$(BUILDTYPE_LOWER) $(V8_TEST_OPTIONS) \
mjsunit cctest debugger inspector message preparser \
$(TAP_V8)
@echo Testing hash seed
$(MAKE) test-hash-seed

test-v8-intl: v8
# Performs a full test unless QUICKCHECK is specified.
deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \
--mode=$(BUILDTYPE_LOWER) --no-presubmit $(QUICKCHECK_ARG) \
--shell-dir=deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) intl \
deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) \
--mode=$(BUILDTYPE_LOWER) intl \
$(TAP_V8_INTL)

test-v8-benchmarks: v8
deps/v8/tools/run-tests.py --arch=$(V8_ARCH) --mode=$(BUILDTYPE_LOWER) \
--download-data $(QUICKCHECK_ARG) --no-presubmit \
--shell-dir=deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) benchmarks \
$(TAP_V8_BENCHMARKS)
deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) --mode=$(BUILDTYPE_LOWER) \
benchmarks \
$(TAP_V8_BENCHMARKS)

test-v8-all: test-v8 test-v8-intl test-v8-benchmarks
# runs all v8 tests
Expand Down
25 changes: 20 additions & 5 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# 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.6',
'v8_embedder_string': '-node.2',

# Enable disassembler for `--print-code` v8 options
'v8_enable_disassembler': 1,
Expand All @@ -49,10 +49,16 @@
'conditions': [
['GENERATOR=="ninja"', {
'obj_dir': '<(PRODUCT_DIR)/obj',
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
'conditions': [
[ 'build_v8_with_gn=="true"', {
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/gypfiles/v8_monolith.gen/gn/obj/libv8_monolith.a',
}, {
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/gypfiles/libv8_base.a',
}],
]
}, {
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base': '<(PRODUCT_DIR)/obj.target/deps/v8/gypfiles/libv8_base.a',
}],
['OS == "win"', {
'os_posix': 0,
Expand All @@ -63,10 +69,19 @@
'os_posix': 1,
'v8_postmortem_support%': 'true',
}],
['OS== "mac"', {
['OS == "mac"', {
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base': '<(PRODUCT_DIR)/libv8_base.a',
}],
['build_v8_with_gn == "true"', {
'conditions': [
['GENERATOR == "ninja"', {
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/gypfiles/v8_monolith.gen/gn/obj/libv8_monolith.a',
}, {
'v8_base': '<(PRODUCT_DIR)/obji.target/v8_monolith/geni/gn/obj/libv8_monolith.a',
}],
],
}],
['openssl_fips != ""', {
'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
}, {
Expand Down
18 changes: 18 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ sys.path.insert(0, 'tools')
import getmoduleversion
from gyp_node import run_gyp

# imports in deps/v8/tools/node
sys.path.insert(0, os.path.join('deps', 'v8', 'tools', 'node'))
from fetch_deps import FetchDeps

# parse our options
parser = optparse.OptionParser()

Expand Down Expand Up @@ -548,6 +552,12 @@ parser.add_option('--without-bundled-v8',
help='do not use V8 includes from the bundled deps folder. ' +
'(This mode is not officially supported for regular applications)')

parser.add_option('--build-v8-with-gn',
action='store_true',
dest='build_v8_with_gn',
default=False,
help='build V8 using GN instead of gyp')

# Create compile_commands.json in out/Debug and out/Release.
parser.add_option('-C',
action='store_true',
Expand Down Expand Up @@ -1060,6 +1070,14 @@ def configure_v8(o):
o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp.
if options.without_bundled_v8 and options.enable_d8:
raise Exception('--enable-d8 is incompatible with --without-bundled-v8.')
if options.without_bundled_v8 and options.build_v8_with_gn:
raise Exception(
'--build-v8-with-gn is incompatible with --without-bundled-v8.')
if options.build_v8_with_gn:
v8_path = os.path.join('deps', 'v8')
print('Fetching dependencies to build V8 with GN')
options.build_v8_with_gn = FetchDeps(v8_path)
o['variables']['build_v8_with_gn'] = b(options.build_v8_with_gn)


def configure_openssl(o):
Expand Down
4 changes: 2 additions & 2 deletions deps/v8/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
/_*
/build
/buildtools
/gypfiles/.gold_plugin
/gypfiles/win_toolchain.json
/hydrogen.cfg
/obj
/out
Expand Down Expand Up @@ -76,6 +74,8 @@
/tools/jsfunfuzz/jsfunfuzz
/tools/jsfunfuzz/jsfunfuzz.tar.gz
/tools/luci-go
/tools/mips_toolchain
/tools/mips_toolchain.tar.gz
/tools/oom_dump/oom_dump
/tools/oom_dump/oom_dump.o
/tools/swarming_client
Expand Down
1 change: 1 addition & 0 deletions deps/v8/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Sanjoy Das <sanjoy@playingwithpointers.com>
Seo Sanghyeon <sanxiyn@gmail.com>
Stefan Penner <stefan.penner@gmail.com>
Sylvestre Ledru <sledru@mozilla.com>
Taketoshi Aono <brn@b6n.ch>
Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Tobias Burnus <burnus@net-b.de>
Victor Costan <costan@gmail.com>
Expand Down
Loading