diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-08-01 08:38:30 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-08-01 12:53:56 +0200 |
commit | 2dcc3665abf57c3607cebffdeeca062f5894885d (patch) | |
tree | 4f560748132edcfb4c22d6f967a7e80d23d7ea2c /deps/v8/gni | |
parent | 1ee47d550c6de132f06110aa13eceb7551d643b3 (diff) | |
download | android-node-v8-2dcc3665abf57c3607cebffdeeca062f5894885d.tar.gz android-node-v8-2dcc3665abf57c3607cebffdeeca062f5894885d.tar.bz2 android-node-v8-2dcc3665abf57c3607cebffdeeca062f5894885d.zip |
deps: update V8 to 7.6.303.28
PR-URL: https://github.com/nodejs/node/pull/28016
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'deps/v8/gni')
-rw-r--r-- | deps/v8/gni/OWNERS | 1 | ||||
-rw-r--r-- | deps/v8/gni/proto_library.gni | 14 | ||||
-rw-r--r-- | deps/v8/gni/snapshot_toolchain.gni | 109 | ||||
-rw-r--r-- | deps/v8/gni/v8.gni | 4 |
4 files changed, 125 insertions, 3 deletions
diff --git a/deps/v8/gni/OWNERS b/deps/v8/gni/OWNERS new file mode 100644 index 0000000000..bdb1d555a4 --- /dev/null +++ b/deps/v8/gni/OWNERS @@ -0,0 +1 @@ +file://INFRA_OWNERS diff --git a/deps/v8/gni/proto_library.gni b/deps/v8/gni/proto_library.gni index 6a00276289..cf581ed46e 100644 --- a/deps/v8/gni/proto_library.gni +++ b/deps/v8/gni/proto_library.gni @@ -13,6 +13,12 @@ template("proto_library") { set_sources_assignment_filter([]) + if (host_os == "win") { + host_executable_suffix = ".exe" + } else { + host_executable_suffix = "" + } + # All the proto imports should be relative to the project root. proto_in_dir = "//" if (defined(invoker.proto_in_dir)) { @@ -42,8 +48,9 @@ template("proto_library") { if (defined(invoker.generator_plugin_label)) { plugin_host_label = invoker.generator_plugin_label + "($host_toolchain)" - plugin_path = get_label_info(plugin_host_label, "root_out_dir") + "/" + - get_label_info(plugin_host_label, "name") + plugin_path = + get_label_info(plugin_host_label, "root_out_dir") + "/" + + get_label_info(plugin_host_label, "name") + host_executable_suffix generate_with_plugin = true } else if (defined(invoker.generator_plugin_script)) { plugin_path = invoker.generator_plugin_script @@ -107,7 +114,8 @@ template("proto_library") { outputs = get_path_info(protogens, "abspath") protoc_label = "//:protoc($host_toolchain)" - protoc_path = get_label_info(protoc_label, "root_out_dir") + "/protoc" + protoc_path = get_label_info(protoc_label, "root_out_dir") + "/protoc" + + host_executable_suffix args = [ # Path should be rebased because |root_build_dir| for current toolchain # may be different from |root_out_dir| of protoc built on host toolchain. diff --git a/deps/v8/gni/snapshot_toolchain.gni b/deps/v8/gni/snapshot_toolchain.gni new file mode 100644 index 0000000000..f4f1f1d88e --- /dev/null +++ b/deps/v8/gni/snapshot_toolchain.gni @@ -0,0 +1,109 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import("//build/config/v8_target_cpu.gni") + +declare_args() { + # The v8 snapshot needs to be built by code that is compiled with a + # toolchain that matches the bit-width of the target CPU, but runs on + # the host. + v8_snapshot_toolchain = "" +} + +# Try to infer the appropriate snapshot toolchain for the v8_current_cpu +# where possible. +# +# Assume that v8_target_cpu (and hence v8_current_cpu) has been validated +# as supported on the current host CPU and OS in v8_target_cpu.gni. The +# logic below is complicated enough without also needing to do input +# validation. +# +# There are test cases for this code posted as an attachment to +# https://crbug.com/625353. +# +# TODO(GYP): Currently only regular (non-cross) compiles, and cross-compiles +# from x64 hosts to Intel, ARM, or MIPS targets, are implemented. Add support +# for the other supported configurations. + +if (v8_snapshot_toolchain == "") { + if (current_os == host_os && current_cpu == host_cpu) { + # This is not a cross-compile, so build the snapshot with the current + # toolchain. + v8_snapshot_toolchain = current_toolchain + } else if (current_os == host_os && current_cpu == "x86" && + host_cpu == "x64") { + # This is an x64 -> x86 cross-compile, but x64 hosts can usually run x86 + # binaries built for the same OS, so build the snapshot with the current + # toolchain here, too. + v8_snapshot_toolchain = current_toolchain + } else if (host_cpu == "x64" && + (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) { + # We don't support snapshot generation for big-endian targets, + # therefore snapshots will need to be built using native mksnapshot + # in combination with qemu + v8_snapshot_toolchain = current_toolchain + } else if (host_cpu == "x64") { + # This is a cross-compile from an x64 host to either a non-Intel target + # cpu or a different target OS. Clang will always be used by default on the + # host, unless this is a ChromeOS build, in which case the same toolchain + # (Clang or GCC) will be used for target and host by default. + if (is_chromeos && !is_clang) { + _clang = "" + } else { + _clang = "clang_" + } + + if (v8_current_cpu == "x64" || v8_current_cpu == "x86") { + _cpus = v8_current_cpu + } else if (v8_current_cpu == "arm64" || v8_current_cpu == "mips64el") { + if (is_win && v8_current_cpu == "arm64") { + # set _cpus to blank for Windows ARM64 so host_toolchain could be + # selected as snapshot toolchain later. + _cpus = "" + } else { + _cpus = "x64_v8_${v8_current_cpu}" + } + } else if (v8_current_cpu == "arm" || v8_current_cpu == "mipsel") { + _cpus = "x86_v8_${v8_current_cpu}" + } else { + # This branch should not be reached; leave _cpus blank so the assert + # below will fail. + _cpus = "" + } + + if (_cpus != "") { + v8_snapshot_toolchain = "//build/toolchain/${host_os}:${_clang}${_cpus}" + } else if (is_win && v8_current_cpu == "arm64") { + # cross compile Windows arm64 with host toolchain. + v8_snapshot_toolchain = host_toolchain + } + } +} + +assert(v8_snapshot_toolchain != "", + "Do not know how to build a snapshot for $current_toolchain " + + "on $host_os $host_cpu") diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index 0a120df8e1..506b8428ee 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -63,6 +63,10 @@ declare_args() { # Expose symbols for dynamic linking. v8_expose_symbols = false + + # Use Perfetto (https://perfetto.dev) as the default TracingController. Not + # currently implemented. + v8_use_perfetto = false } if (v8_use_external_startup_data == "") { |