From 04a0e487ece54c7e1568f53e3dc8b247dcf6ca74 Mon Sep 17 00:00:00 2001 From: brettw Date: Wed, 25 Jan 2017 13:29:59 -0800 Subject: [PATCH] Use default_args for configuring V8. Removes the values in build_overrides/v8.gni and uses the new default_args in the "//.gn" file to set these arguments. Once all places are updated, we can remove build_overrides/v8.gni. BUG=684096 Review-Url: https://codereview.chromium.org/2648233006 Cr-Commit-Position: refs/heads/master@{#446124} --- .gn | 26 ++++++++++++++++++++++++++ build_overrides/v8.gni | 25 +++---------------------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/.gn b/.gn index f3ea8df868bae6..264ffacab2fa03 100644 --- a/.gn +++ b/.gn @@ -12,6 +12,32 @@ buildconfig = "//build/config/BUILDCONFIG.gn" # in the source tree, e.g. for third party source trees. secondary_source = "//build/secondary/" +# These arguments override the default values for items in a declare_args +# block. "gn args" in turn can override these. +# +# In general the value for a build arg in the declare_args block should be the +# default. In some cases, a DEPS-ed in project will want different defaults for +# being built as part of Chrome vs. being built standalone. In this case, the +# Chrome defaults should go here. There should be no overrides here for +# values declared in the main Chrome repository. +default_args = { + v8_extra_library_files = [ + # Dependencies used by the extra libraries. Putting them here causes them + # to be executed first during snapshot creation. + "//third_party/WebKit/Source/core/streams/CommonStrings.js", + + # Extra libraries. + "//third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js", + "//third_party/WebKit/Source/core/streams/CountQueuingStrategy.js", + "//third_party/WebKit/Source/core/streams/ReadableStream.js", + ] + v8_experimental_extra_library_files = + [ "//third_party/WebKit/Source/core/streams/WritableStream.js" ] + v8_enable_inspector = true + v8_enable_gdbjit = false + v8_imminent_deprecation_warnings = false +} + # These are the targets to check headers for by default. The files in targets # matching these patterns (see "gn help label_pattern" for format) will have # their includes checked for proper dependencies when you run either diff --git a/build_overrides/v8.gni b/build_overrides/v8.gni index a6370713b334a2..d67fd16d90f462 100644 --- a/build_overrides/v8.gni +++ b/build_overrides/v8.gni @@ -2,26 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# V8 extras -# Adding V8 extras files requires API owners review +# This file should be empty. -# This list is for files that export symbols that are used in other extras -# files. Putting them here causes them to be executed first during snapshot -# creation. -_v8_extras_dependencies = - [ "//third_party/WebKit/Source/core/streams/CommonStrings.js" ] - -_v8_extras = [ - "//third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js", - "//third_party/WebKit/Source/core/streams/CountQueuingStrategy.js", - "//third_party/WebKit/Source/core/streams/ReadableStream.js", -] - -v8_extra_library_files = _v8_extras_dependencies + _v8_extras - -v8_experimental_extra_library_files = - [ "//third_party/WebKit/Source/core/streams/WritableStream.js" ] - -v8_enable_inspector_override = true -v8_enable_gdbjit_default = false -v8_imminent_deprecation_warnings_default = false +# TODO(brettw) http://crbug.com/684096 Remove this when all callers are updated +# to use the new build overrides system.