From 57a16c256933da3a07a58b90f446ec2db0e2aa3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 3 Jul 2021 11:57:07 +0200 Subject: [PATCH 1/9] deps: V8: backport 1b1eda0876aa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: tracing: Update proto library build rule and roll Perfetto This patch removes use of the deprecated sources_assignment_filter GN feature from gni/proto_library.gni, since the extra descriptor files are no longer being generated. We also roll Perfetto to match the version used in Chrome and update test expectations accordingly. Bug: v8:10995 Change-Id: I65cb3b79feb6e5a7e5c8d99fdb8bf999a6048539 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2454079 Commit-Queue: Michael Achenbach Auto-Submit: Sami Kyöstilä Reviewed-by: Peter Marshall Reviewed-by: Michael Achenbach Cr-Commit-Position: refs/heads/master@{#70381} Refs: https://github.com/v8/v8/commit/1b1eda0876aa20bc1dc71caa6baf3a52c0c1540d --- common.gypi | 2 +- deps/v8/DEPS | 2 +- deps/v8/gni/proto_library.gni | 11 ++++++----- deps/v8/test/cctest/libplatform/test-tracing.cc | 9 +++++---- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/common.gypi b/common.gypi index 102a1facd41af6..f6d4f0a2860876 100644 --- a/common.gypi +++ b/common.gypi @@ -34,7 +34,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.47', + 'v8_embedder_string': '-node.48', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/DEPS b/deps/v8/DEPS index a7d4081edb856c..7eaa7fc5b57069 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -246,7 +246,7 @@ deps = { 'dep_type': 'cipd', }, 'v8/third_party/perfetto': - Var('android_url') + '/platform/external/perfetto.git' + '@' + '01615892494a9a8dc84414962d0a817bf97de2c2', + Var('android_url') + '/platform/external/perfetto.git' + '@' + '7cdc44f903d3bcfd1d0f67188bfa797a24756868', 'v8/third_party/protobuf': Var('chromium_url') + '/external/github.com/google/protobuf'+ '@' + 'b68a347f56137b4b1a746e8c7438495a6ac1bd91', } diff --git a/deps/v8/gni/proto_library.gni b/deps/v8/gni/proto_library.gni index b16d8f93bd8fcd..f921a15685dba1 100644 --- a/deps/v8/gni/proto_library.gni +++ b/deps/v8/gni/proto_library.gni @@ -11,8 +11,6 @@ template("proto_library") { assert(defined(invoker.sources)) proto_sources = invoker.sources - set_sources_assignment_filter([]) - if (host_os == "win") { host_executable_suffix = ".exe" } else { @@ -137,6 +135,12 @@ template("proto_library") { ] } + if (defined(invoker.import_dirs)) { + foreach(path, invoker.import_dirs) { + args += [ "--import-dir=" + rebase_path(path, root_build_dir) ] + } + } + if (generate_with_plugin) { plugin_path_rebased = rebase_path(plugin_path, root_build_dir) plugin_out_args = "" @@ -187,10 +191,7 @@ template("proto_library") { "visibility", ]) - # Exclude the config.descriptor file which is an output for some reason. - set_sources_assignment_filter([ "*.descriptor" ]) sources = get_target_outputs(":$action_name") - set_sources_assignment_filter(sources_assignment_filter) # configs -= [ "//gn/standalone:extra_warnings" ] if (defined(invoker.extra_configs)) { diff --git a/deps/v8/test/cctest/libplatform/test-tracing.cc b/deps/v8/test/cctest/libplatform/test-tracing.cc index a98445be978f27..6694f38d28af18 100644 --- a/deps/v8/test/cctest/libplatform/test-tracing.cc +++ b/deps/v8/test/cctest/libplatform/test-tracing.cc @@ -891,10 +891,11 @@ TEST(JsonIntegrationTest) { std::vector all_args; GetJSONStrings(&all_args, json, "\"args\"", "{", "}"); - CHECK_EQ("\"1\":1e+100", all_args[0]); - CHECK_EQ("\"2\":\"NaN\"", all_args[1]); - CHECK_EQ("\"3\":\"Infinity\"", all_args[2]); - CHECK_EQ("\"4\":\"-Infinity\"", all_args[3]); + // Ignore the first metadata event. + CHECK_EQ("\"1\":1e+100", all_args[1]); + CHECK_EQ("\"2\":\"NaN\"", all_args[2]); + CHECK_EQ("\"3\":\"Infinity\"", all_args[3]); + CHECK_EQ("\"4\":\"-Infinity\"", all_args[4]); } TEST(TracingPerfetto) { From 3ab554c8250f673818e48ffedca400896e1e6d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 3 Jul 2021 11:57:22 +0200 Subject: [PATCH 2/9] deps: V8: cherry-pick 92e6d3317082 Original commit message: build: Remove no-op calls to set_sources_assignment_filter Chromiun no longer use set_sources_assignment_filter() anywhere in the build, so these are no longer needed. Bug: chromium:1018739 Change-Id: I7b33612d925563ebca0d93a7d3c9183d7305b7b0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2456988 Reviewed-by: Nico Weber Commit-Queue: Nico Weber Cr-Commit-Position: refs/heads/master@{#70405} Refs: https://github.com/v8/v8/commit/92e6d3317082e492ff11fd50a1f3481368f6cafc --- common.gypi | 2 +- deps/v8/testing/gtest/BUILD.gn | 18 ++++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/common.gypi b/common.gypi index f6d4f0a2860876..28996822e364f3 100644 --- a/common.gypi +++ b/common.gypi @@ -34,7 +34,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.48', + 'v8_embedder_string': '-node.49', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/testing/gtest/BUILD.gn b/deps/v8/testing/gtest/BUILD.gn index fe7ba6d4839da5..6636b2d9acf448 100644 --- a/deps/v8/testing/gtest/BUILD.gn +++ b/deps/v8/testing/gtest/BUILD.gn @@ -4,9 +4,9 @@ import("//build_overrides/gtest.gni") if (is_ios) { + import("//build/buildflag_header.gni") import("//build/config/coverage/coverage.gni") import("//build/config/ios/ios_sdk.gni") - import("//build/buildflag_header.gni") } config("gtest_direct_config") { @@ -40,9 +40,7 @@ static_library("gtest") { # Android. https://codereview.chromium.org/2852613002/#ps20001 "empty.cc", ] - public_deps = [ - "//third_party/googletest:gtest", - ] + public_deps = [ "//third_party/googletest:gtest" ] public_configs = [ ":gtest_direct_config" ] @@ -58,9 +56,6 @@ static_library("gtest") { } if ((is_mac || is_ios) && gtest_include_objc_support) { - if (is_ios) { - set_sources_assignment_filter([]) - } sources += [ "../gtest_mac.h", "../gtest_mac.mm", @@ -68,7 +63,6 @@ static_library("gtest") { if (gtest_include_platform_test) { sources += [ "../platform_test_mac.mm" ] } - set_sources_assignment_filter(sources_assignment_filter) } if (is_ios && gtest_include_ios_coverage) { @@ -76,9 +70,7 @@ static_library("gtest") { "../coverage_util_ios.h", "../coverage_util_ios.mm", ] - deps = [ - ":ios_enable_coverage", - ] + deps = [ ":ios_enable_coverage" ] } } @@ -87,9 +79,7 @@ static_library("gtest") { # into //third_party/googletest. source_set("gtest_main") { testonly = true - deps = [ - "//third_party/googletest:gtest_main", - ] + deps = [ "//third_party/googletest:gtest_main" ] } if (is_ios) { From bf38b05787a20073e582f3b8e515e11aff578fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 3 Jul 2021 16:11:13 +0200 Subject: [PATCH 3/9] deps: V8: cherry-pick e6f62a41f5ee Original commit message: [build] Remove jumbo build configs Bug: chromium:994387 Change-Id: I7b37a416ce6cc79903fe04923e86af1d0065ac37 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1890090 Reviewed-by: Maya Lekova Reviewed-by: Yang Guo Commit-Queue: Michael Achenbach Cr-Commit-Position: refs/heads/master@{#64669} Refs: https://github.com/v8/v8/commit/e6f62a41f5ee1524eb6fefb4bbb699373f613b1e --- common.gypi | 2 +- deps/v8/BUILD.gn | 35 --------------------------------- deps/v8/gni/v8.gni | 9 ++++----- deps/v8/infra/mb/mb_config.pyl | 27 ------------------------- deps/v8/test/cctest/BUILD.gn | 10 ---------- deps/v8/test/unittests/BUILD.gn | 9 --------- 6 files changed, 5 insertions(+), 87 deletions(-) diff --git a/common.gypi b/common.gypi index 28996822e364f3..35989a3263a510 100644 --- a/common.gypi +++ b/common.gypi @@ -34,7 +34,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.49', + 'v8_embedder_string': '-node.50', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 90ec4097d7a2b8..0fb0839fa13d71 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -6,7 +6,6 @@ import("//build/config/android/config.gni") import("//build/config/arm.gni") import("//build/config/dcheck_always_on.gni") import("//build/config/host_byteorder.gni") -import("//build/config/jumbo.gni") import("//build/config/mips.gni") import("//build/config/sanitizers/sanitizers.gni") import("//build_overrides/build.gni") @@ -1470,17 +1469,12 @@ if (v8_use_snapshot && v8_use_external_startup_data) { if (v8_use_multi_snapshots) { deps += [ ":asm_to_inline_asm_trusted" ] sources += [ "$target_gen_dir/embedded_trusted.cc" ] - jumbo_excluded_sources = [ "$target_gen_dir/embedded_trusted.cc" ] } } else if (v8_enable_embedded_builtins) { sources += [ "$target_gen_dir/embedded.S" ] if (v8_use_multi_snapshots) { sources += [ "$target_gen_dir/embedded_trusted.S" ] - jumbo_excluded_sources = [ - # Duplicated symbols with embedded.S - "$target_gen_dir/embedded_trusted.S", - ] } } else { sources += [ "src/snapshot/embedded/embedded-empty.cc" ] @@ -1577,17 +1571,6 @@ v8_source_set("v8_initializers") { "src/interpreter/interpreter-intrinsics-generator.h", ] - jumbo_excluded_sources = [ - # TODO(mostynb@vewd.com): don't exclude these http://crbug.com/752428 - "src/builtins/builtins-async-iterator-gen.cc", - "src/builtins/builtins-async-generator-gen.cc", - - # These source files take an unusually large amount of time to - # compile. Build them separately to avoid bottlenecks. - "src/builtins/builtins-regexp-gen.cc", - "src/codegen/code-stub-assembler.cc", - ] - if (v8_current_cpu == "x86") { sources += [ ### gcmole(arch:ia32) ### @@ -2996,19 +2979,6 @@ v8_source_set("v8_base_without_compiler") { sources += check_header_includes_sources } - jumbo_excluded_sources = [ - # TODO(mostynb@vewd.com): don't exclude these http://crbug.com/752428 - "src/profiler/heap-snapshot-generator.cc", # Macro clash in mman-linux.h - - # These source files take an unusually large amount of time to - # compile. Build them separately to avoid bottlenecks. - "src/api/api.cc", - "src/heap/heap.cc", - "src/objects/elements.cc", - "src/objects/objects.cc", - "src/parsing/parser.cc", - ] - if (v8_current_cpu == "x86") { sources += [ ### gcmole(arch:ia32) ### "src/codegen/ia32/assembler-ia32-inl.h", @@ -3162,11 +3132,6 @@ v8_source_set("v8_base_without_compiler") { "src/diagnostics/unwinding-info-win64.h", ] } - jumbo_excluded_sources += [ - # TODO(mostynb@vewd.com): fix this code so it doesn't need - # to be excluded, see the comments inside. - "src/codegen/arm64/instructions-arm64-constants.cc", - ] } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") { sources += [ ### gcmole(arch:mipsel) ### "src/codegen/mips/assembler-mips-inl.h", diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index e55c4cf3468460..e7fb6a618109cf 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -2,7 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//build/config/jumbo.gni") import("//build/config/sanitizers/sanitizers.gni") import("//build/config/v8_target_cpu.gni") import("//build/split_static_library.gni") @@ -80,7 +79,7 @@ if (v8_use_multi_snapshots) { # build configuration. This allows us to set v8_use_multi_snapshots=true on # all bots, and e.g. no-snapshot bots will automatically do the right thing. v8_use_multi_snapshots = - v8_use_external_startup_data && !build_with_chromium && !use_jumbo_build + v8_use_external_startup_data && !build_with_chromium } if (v8_enable_backtrace == "") { @@ -149,9 +148,9 @@ template("v8_source_set") { defined(v8_static_library) && v8_static_library && is_win) { link_target_type = "jumbo_split_static_library" } else if (defined(v8_static_library) && v8_static_library) { - link_target_type = "jumbo_static_library" + link_target_type = "static_library" } else { - link_target_type = "jumbo_source_set" + link_target_type = "source_set" } target(link_target_type, target_name) { forward_variables_from(invoker, @@ -170,7 +169,7 @@ template("v8_source_set") { } template("v8_header_set") { - jumbo_source_set(target_name) { + source_set(target_name) { forward_variables_from(invoker, "*", [ "configs" ]) configs -= v8_remove_configs configs += v8_add_configs diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index d5d192fb20ca94..f2330361257625 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -64,11 +64,6 @@ 'V8 Linux64 - debug - header includes': 'debug_x64_header_includes', 'V8 Linux64 - shared': 'release_x64_shared_verify_heap', 'V8 Linux64 - verify csa': 'release_x64_verify_csa', - # Jumbo. - 'V8 Linux64 Jumbo': 'release_x64_jumbo', - 'V8 Linux64 Jumbo - debug': 'debug_x64_jumbo', - 'V8 Linux64 Jumbo - limited': 'release_x64_jumbo_limited', - 'V8 Linux64 Jumbo - limited - debug': 'debug_x64_jumbo_limited', # Windows. 'V8 Win32 - builder': 'release_x86_minimal_symbols', 'V8 Win32 - debug builder': 'debug_x86_minimal_symbols', @@ -230,8 +225,6 @@ 'v8_linux64_msan_rel': 'release_simulate_arm64_msan_minimal_symbols', 'v8_linux64_sanitizer_coverage_rel': 'release_x64_asan_minimal_symbols_coverage', - 'v8_linux64_jumbo_compile_rel': 'release_x64_jumbo_trybot', - 'v8_linux64_jumbo_limited_compile_rel': 'release_x64_jumbo_limited_trybot', 'v8_linux64_tsan_rel': 'release_x64_tsan_minimal_symbols', 'v8_linux64_tsan_isolates_rel_ng': 'release_x64_tsan_minimal_symbols', @@ -448,14 +441,6 @@ 'release_bot', 'x64', 'ios_simulator'], 'release_x64_internal': [ 'release_bot', 'x64', 'v8_snapshot_internal'], - 'release_x64_jumbo': [ - 'release_bot', 'x64', 'jumbo'], - 'release_x64_jumbo_trybot': [ - 'release_trybot', 'x64', 'jumbo'], - 'release_x64_jumbo_limited': [ - 'release_bot', 'x64', 'jumbo_limited'], - 'release_x64_jumbo_limited_trybot': [ - 'release_trybot', 'x64', 'jumbo_limited'], 'release_x64_minimal_symbols': [ 'release_bot', 'x64', 'minimal_symbols'], 'release_x64_pointer_compression': [ @@ -499,10 +484,6 @@ 'debug_bot', 'x64', 'gcc', 'v8_check_header_includes'], 'debug_x64_header_includes': [ 'debug_bot', 'x64', 'v8_check_header_includes'], - 'debug_x64_jumbo': [ - 'debug_bot', 'x64', 'jumbo'], - 'debug_x64_jumbo_limited': [ - 'debug_bot', 'x64', 'jumbo_limited'], 'debug_x64_minimal_symbols': [ 'debug_bot', 'x64', 'minimal_symbols'], 'debug_x64_perfetto': [ @@ -668,14 +649,6 @@ 'gn_args': 'target_cpu="x64" target_os="ios"', }, - 'jumbo': { - 'gn_args': 'use_jumbo_build=true', - }, - - 'jumbo_limited': { - 'gn_args': 'use_jumbo_build=true jumbo_file_merge_limit=50', - }, - 'lsan': { 'mixins': ['v8_enable_test_features'], 'gn_args': 'is_lsan=true', diff --git a/deps/v8/test/cctest/BUILD.gn b/deps/v8/test/cctest/BUILD.gn index d0934c99773456..1a527073450fac 100644 --- a/deps/v8/test/cctest/BUILD.gn +++ b/deps/v8/test/cctest/BUILD.gn @@ -294,16 +294,6 @@ v8_source_set("cctest_sources") { "wasm/wasm-run-utils.h", ] - if (use_jumbo_build) { - jumbo_excluded_sources = [ - # TODO(mostynb@opera.com): figure out the jumbo issues with these source - # files, and include them in jumbo compilation units. - "interpreter/bytecode-expectations-printer.cc", - "interpreter/test-bytecode-generator.cc", - "test-api.cc", - ] - } - if (v8_current_cpu == "arm") { sources += [ ### gcmole(arch:arm) ### "assembler-helper-arm.cc", diff --git a/deps/v8/test/unittests/BUILD.gn b/deps/v8/test/unittests/BUILD.gn index f223b423d293a7..e2a959420222ce 100644 --- a/deps/v8/test/unittests/BUILD.gn +++ b/deps/v8/test/unittests/BUILD.gn @@ -233,15 +233,6 @@ v8_source_set("unittests_sources") { "zone/zone-unittest.cc", ] - if (use_jumbo_build) { - jumbo_excluded_sources = [ - # TODO(mostynb@opera.com): figure out how to make this build in both - # modes. Template issues on windows if we add a functional_unittest - # namespace as with the other files. - "base/functional-unittest.cc", - ] - } - if (v8_current_cpu == "arm") { sources += [ "assembler/turbo-assembler-arm-unittest.cc", From 89bf643681b1c862fc36428bbb79777169aa7f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 3 Jul 2021 16:36:37 +0200 Subject: [PATCH 4/9] deps: V8: cherry-pick 7b3332844212 Original commit message: [build] Move split_static_library.gni from Chromium repo We'll remove the file from Chromium in a follow up after V8 has rolled + 2 days. Bug: v8:9911 Change-Id: I69fe56855f1ba83bec0d39e0fb6acb7e4182c6b7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1897826 Reviewed-by: Nico Weber Commit-Queue: Michael Achenbach Cr-Commit-Position: refs/heads/master@{#64742} Refs: https://github.com/v8/v8/commit/7b3332844212d78ee87a9426f3a6f7f781a8fbfa --- common.gypi | 2 +- deps/v8/gni/split_static_library.gni | 78 ++++++++++++++++++++++++++++ deps/v8/gni/v8.gni | 2 +- 3 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 deps/v8/gni/split_static_library.gni diff --git a/common.gypi b/common.gypi index 35989a3263a510..a7c1e4623e6147 100644 --- a/common.gypi +++ b/common.gypi @@ -34,7 +34,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.50', + 'v8_embedder_string': '-node.51', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/gni/split_static_library.gni b/deps/v8/gni/split_static_library.gni new file mode 100644 index 00000000000000..c72665e245f0ee --- /dev/null +++ b/deps/v8/gni/split_static_library.gni @@ -0,0 +1,78 @@ +# Copyright 2019 the V8 project authors. All rights reserved. +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/compiler/compiler.gni") + +template("split_static_library") { + assert(defined(invoker.split_count), + "Must define split_count for split_static_library") + + # In many conditions the number of inputs will be 1 (because the + # count will be conditional on platform or configuration) and for + # some build configurations it's unnecessary to split libraries + # since the tooling will never create files of a problematic size. + if (invoker.split_count == 1 || use_lld) { + static_library(target_name) { + forward_variables_from(invoker, "*") + } + } else { + group_name = target_name + + generated_static_libraries = [] + current_library_index = 0 + foreach(current_sources, split_list(invoker.sources, invoker.split_count)) { + current_name = "${target_name}_$current_library_index" + assert( + current_sources != [], + "Your values for splitting a static library generate one that has no sources.") + generated_static_libraries += [ ":$current_name" ] + + static_library(current_name) { + # Generated static library shard gets everything but sources (which + # we're redefining) and visibility (which is set to be the group + # below). + forward_variables_from(invoker, + "*", + [ + "check_includes", + "sources", + "visibility", + ]) + sources = current_sources + visibility = [ ":$group_name" ] + + # When splitting a target's sources up into a series of static + # libraries, those targets will naturally include headers from each + # other arbitrarily. We could theoretically generate a web of + # dependencies and allow_circular_includes_from between all pairs of + # targets, but that's very cumbersome. Typical usage in Chrome is that + # only official Windows builds use split static libraries due to the + # Visual Studio size limits, and this means we'll still get header + # checking coverage for the other configurations. + check_includes = false + + # Uniquify the output name if one is specified. + if (defined(invoker.output_name)) { + output_name = "${invoker.output_name}_$current_library_index" + } + } + + current_library_index = current_library_index + 1 + } + + group(group_name) { + public_deps = generated_static_libraries + forward_variables_from(invoker, + [ + "testonly", + "visibility", + ]) + } + } +} + +set_defaults("split_static_library") { + configs = default_compiler_configs +} diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index e7fb6a618109cf..db71a4188b2b88 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -4,7 +4,7 @@ import("//build/config/sanitizers/sanitizers.gni") import("//build/config/v8_target_cpu.gni") -import("//build/split_static_library.gni") +import("split_static_library.gni") declare_args() { # Set flags for tracking code coverage. Uses gcov with gcc and sanitizer From 821115234cec6214ccd10084bc1656e4f1db3c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 3 Jul 2021 16:56:38 +0200 Subject: [PATCH 5/9] deps: V8: cherry-pick cc641f6be756 Original commit message: Add a simple gclient_args.gni file to V8 Bug: v8:9914 Change-Id: I0bae9aadd89876e8505e1388903c86777694ee09 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1890100 Reviewed-by: Michael Achenbach Commit-Queue: Maya Lekova Cr-Commit-Position: refs/heads/master@{#64680} Refs: https://github.com/v8/v8/commit/cc641f6be7561c166409a04c75199746f8a43ddd --- common.gypi | 2 +- deps/v8/DEPS | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index a7c1e4623e6147..2f5b153ca4bc1f 100644 --- a/common.gypi +++ b/common.gypi @@ -34,7 +34,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.51', + 'v8_embedder_string': '-node.52', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 7eaa7fc5b57069..8d7e1568307ff2 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -2,7 +2,15 @@ # directory and assume that the root of the checkout is in ./v8/, so # all paths in here must match this assumption. +gclient_gn_args_file = 'v8/build/config/gclient_args.gni' +gclient_gn_args = [ + 'checkout_aemu' +] + vars = { + # By Default, do not checkout AEMU, as it is too big, as is done in Chromium. + 'checkout_aemu': False, + # Fetches only the SDK boot images which match at least one of the whitelist # entries in a comma-separated list. # From cee5e6ae5b70cfb221c2e99947d7aea3c3621bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 3 Jul 2021 17:11:09 +0200 Subject: [PATCH 6/9] deps: V8: cherry-pick 7c182bd65f42 Original commit message: Fix visiblity rules for configs enforced by the latest GN version. Prior versions of GN had a bug (gn:22) where visibility rules for configs weren't being enforced properly. This CL tweaks the visibility settings of some configs to conform to the latest version. Change-Id: Ic5d827a1f2774278d3894f67fe52bfca836c0409 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2360909 Commit-Queue: Dirk Pranke Reviewed-by: Adam Klein Cr-Commit-Position: refs/heads/master@{#69463} Refs: https://github.com/v8/v8/commit/7c182bd65f424db19dc3e3d9aca601030af30d7e --- common.gypi | 2 +- deps/v8/BUILD.gn | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/common.gypi b/common.gypi index 2f5b153ca4bc1f..e4ae77a8af3ae0 100644 --- a/common.gypi +++ b/common.gypi @@ -34,7 +34,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.52', + 'v8_embedder_string': '-node.53', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 0fb0839fa13d71..5c226f4b836af6 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -265,7 +265,8 @@ v8_toolset_for_shell = "host" # config("internal_config_base") { - visibility = [ ":*" ] # Only targets in this file can depend on this. + # Only targets in this file and its subdirs can depend on this. + visibility = [ "./*" ] include_dirs = [ ".", @@ -275,7 +276,8 @@ config("internal_config_base") { config("internal_config") { defines = [] - visibility = [ ":*" ] # Only targets in this file can depend on this. + # Only targets in this file and its subdirs can depend on this. + visibility = [ "./*" ] configs = [ "//build/config/compiler:wexit_time_destructors", @@ -361,7 +363,8 @@ config("v8_header_features") { # Put defines here that are only used in our internal files and NEVER in # external headers that embedders (such as chromium and node) might include. config("features") { - visibility = [ ":*" ] # Only targets in this file can depend on this. + # Only targets in this file and its subdirs can depend on this. + visibility = [ "./*" ] defines = [] @@ -478,7 +481,8 @@ config("features") { } config("toolchain") { - visibility = [ ":*" ] # Only targets in this file can depend on this. + # Only targets in this file and its subdirs can depend on this. + visibility = [ "./*" ] defines = [] cflags = [] From 7d91f57b0f72e6dc9d778b85c649c10c4a2d59d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 7 Jul 2021 11:24:45 +0200 Subject: [PATCH 7/9] deps: V8: cherry-pick 0b3a4ecf7083 Original commit message: Fix implicit conversion loses integer precision warning The type of m is long in 64 bits build, and results implicit conversion loses integer precision, which was found by improved clang warning (-Wshorten-64-to-32) Bug: chromium:1124085 Change-Id: Ic9f22508bd817a06d5c90162b1ac3554a7171529 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2391323 Commit-Queue: Zequan Wu Auto-Submit: Zequan Wu Reviewed-by: Nico Weber Reviewed-by: Igor Sheludko Cr-Commit-Position: refs/heads/master@{#69686} Refs: https://github.com/v8/v8/commit/0b3a4ecf708334ff20dd5a978c3765e75675b40b --- common.gypi | 2 +- deps/v8/src/base/macros.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common.gypi b/common.gypi index e4ae77a8af3ae0..18bde8e9d0f2b7 100644 --- a/common.gypi +++ b/common.gypi @@ -34,7 +34,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.53', + 'v8_embedder_string': '-node.54', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/base/macros.h b/deps/v8/src/base/macros.h index ad70e9820ddb4a..e24ff94ab48f8e 100644 --- a/deps/v8/src/base/macros.h +++ b/deps/v8/src/base/macros.h @@ -357,14 +357,14 @@ inline T RoundDown(T x, intptr_t m) { STATIC_ASSERT(std::is_integral::value); // m must be a power of two. DCHECK(m != 0 && ((m & (m - 1)) == 0)); - return x & -m; + return x & static_cast(-m); } template constexpr inline T RoundDown(T x) { STATIC_ASSERT(std::is_integral::value); // m must be a power of two. STATIC_ASSERT(m != 0 && ((m & (m - 1)) == 0)); - return x & -m; + return x & static_cast(-m); } // Return the smallest multiple of m which is >= x. From a5147bccf49132d3636fb8ce4dd6be3ed5c85e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 7 Jul 2021 12:02:18 +0200 Subject: [PATCH 8/9] deps: V8: backport 895949419186 Original commit message: Add -Wno-string-concatenation to test/cctest:cctest_sources v8/test/cctest/interpreter/test-bytecode-generator.cc contains lots of string arrays with intentional concatenation. Bug: chromium:1114873 Change-Id: Ie9d35c3849b5b0a6d1d01b6ce21fb80a320d8736 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2366829 Commit-Queue: Arthur Eubanks Reviewed-by: Sathya Gunasekaran Cr-Commit-Position: refs/heads/master@{#69625} Refs: https://github.com/v8/v8/commit/8959494191869ff483927916f9f46eb419784f07 --- common.gypi | 2 +- deps/v8/test/cctest/BUILD.gn | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index 18bde8e9d0f2b7..32ceb385180688 100644 --- a/common.gypi +++ b/common.gypi @@ -34,7 +34,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.54', + 'v8_embedder_string': '-node.55', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/test/cctest/BUILD.gn b/deps/v8/test/cctest/BUILD.gn index 1a527073450fac..8acd2e50f3edff 100644 --- a/deps/v8/test/cctest/BUILD.gn +++ b/deps/v8/test/cctest/BUILD.gn @@ -63,6 +63,12 @@ v8_header_set("cctest_headers") { ] } +config("cctest_sources_config") { + if (is_clang) { + cflags = [ "-Wno-string-concatenation" ] + } +} + v8_source_set("cctest_sources") { testonly = true @@ -376,6 +382,7 @@ v8_source_set("cctest_sources") { configs = [ "../..:external_config", "../..:internal_config_base", + ":cctest_sources_config", ] public_deps = [ From b9bf7d922cab3248866b68b660651eca251337d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 3 Jul 2021 15:44:39 +0200 Subject: [PATCH 9/9] deps: V8: update build dependencies These updates are necessary to build V8 with recent GN versions. --- deps/v8/DEPS | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 8d7e1568307ff2..7f4c3afd904adc 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -80,15 +80,15 @@ vars = { deps = { 'v8/build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + '693faeda4ee025796c7e473d953a5a7b6ad64c93', + Var('chromium_url') + '/chromium/src/build.git' + '@' + 'c854b8178a7e0a20b168ffded4f2d2cb1e136e42', 'v8/third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'f38bc1796282c61087dcf15abc61b8fd18a68402', + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'd4e6fb6573e0955110a2c69be29557f6626d9ae6', 'v8/third_party/icu': Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '53f6b233a41ec982d8445996247093f7aaf41639', 'v8/third_party/instrumented_libraries': Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + 'b1c3ca20848c117eb935b02c25d441f03e6fbc5e', 'v8/buildtools': - Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '74cfb57006f83cfe050817526db359d5c8a11628', + Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '6302c1175607a436e18947a5abe9df2209e845fc', 'v8/buildtools/clang_format/script': Var('chromium_url') + '/chromium/llvm-project/cfe/tools/clang-format.git' + '@' + '96636aa0e9f047f17447f2d45a094d0b59ed7917', 'v8/buildtools/linux64': { @@ -112,11 +112,11 @@ deps = { 'condition': 'host_os == "mac"', }, 'v8/buildtools/third_party/libc++/trunk': - Var('chromium_url') + '/chromium/llvm-project/libcxx.git' + '@' + '5938e0582bac570a41edb3d6a2217c299adc1bc6', + Var('chromium_url') + '/chromium/llvm-project/libcxx.git' + '@' + '78d6a7767ed57b50122a161b91f59f19c9bd0d19', 'v8/buildtools/third_party/libc++abi/trunk': - Var('chromium_url') + '/chromium/llvm-project/libcxxabi.git' + '@' + '0d529660e32d77d9111912d73f2c74fc5fa2a858', + Var('chromium_url') + '/chromium/llvm-project/libcxxabi.git' + '@' + 'ce3db128f9e4d6d19d1cdbe39bb45fcc64a5adb0', 'v8/buildtools/third_party/libunwind/trunk': - Var('chromium_url') + '/external/llvm.org/libunwind.git' + '@' + '69d9b84cca8354117b9fe9705a4430d789ee599b', + Var('chromium_url') + '/external/llvm.org/libunwind.git' + '@' + '3e6ec2ae9afaa3683269b690612f84d907943ea2', 'v8/buildtools/win': { 'packages': [ { @@ -176,7 +176,7 @@ deps = { 'dep_type': 'cipd', }, 'v8/third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + 'e7c719c3e85f76938bf4fef0ba37c27f89246f71', + 'url': Var('chromium_url') + '/catapult.git' + '@' + 'f92a7636da65f28dad15bc524e6b681d1c311de0', 'condition': 'checkout_android', }, 'v8/third_party/colorama/src': { @@ -224,7 +224,7 @@ deps = { 'dep_type': 'cipd', }, 'v8/tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '2fef805e5b05b26a8c87c47865590b5f43218611', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'c72342ce992ebd9cc02c0d65f0af5941d29eb217', 'v8/tools/luci-go': { 'packages': [ {