Commit 98dbcfde authored by brettw's avatar brettw Committed by Commit bot

Conditionally convert V8 build overrides to declare_args.

We're converting the build_overrides system to the new default_args list of
overrides that can be listed in the toplevel .gn file. This will allow args to
be set on a per-repo basis.

This change conditionally adds the variables currently defined in
build_overrides/v8.gni to build args. This allows V8's build to be used in both
the new and old systems. Once all Chrome and pdfium have been updated, v8's
build overrides and the conditional checks around the new args can be removed.

BUG=684096

Review-Url: https://codereview.chromium.org/2654663003
Cr-Commit-Position: refs/heads/master@{#42639}
parent e56437b6
......@@ -30,7 +30,15 @@ declare_args() {
v8_deprecation_warnings = false
# Enable compiler warnings when using V8_DEPRECATE_SOON apis.
v8_imminent_deprecation_warnings = ""
#
# TODO(brettw) http://crbug.com/684096 Remove the define condition and the
# v8_imminent_deprecation_warnings_default variable when the build_override
# conversion is complete. This value should just default to true.
if (defined(v8_imminent_deprecation_warnings_default)) {
v8_imminent_deprecation_warnings = v8_imminent_deprecation_warnings_default
} else {
v8_imminent_deprecation_warnings = false
}
# Embeds the given script into the snapshot.
v8_embed_script = ""
......@@ -76,22 +84,38 @@ declare_args() {
# Similar to the ARM hard float ABI but on MIPS.
v8_use_mips_abi_hardfloat = true
}
# Set project-specific defaults for some args if not provided in args.gn. The
# defaults can be set in the respective build_overrides files.
if (v8_imminent_deprecation_warnings == "") {
if (defined(v8_imminent_deprecation_warnings_default)) {
v8_imminent_deprecation_warnings = v8_imminent_deprecation_warnings_default
} else {
v8_imminent_deprecation_warnings = false
# List of extra files to snapshot. They will be snapshotted in order so
# if files export symbols used by later files, they should go first.
#
# This default is used by cctests. Projects using V8 will want to override.
#
# TODO(brettw) http://crbug.com/684096 Remove the define condition when the
# build_override conversion is complete.
if (!defined(v8_extra_library_files)) {
v8_extra_library_files = [
"//test/cctest/test-extra.js"
]
}
}
if (v8_enable_gdbjit == "") {
# Like v8_extra_library_files but for experimental features.
#
# This default is used by cctests. Projects using V8 will want to override.
#
# TODO(brettw) http://crbug.com/684096 Remove the define condition when the
# build_override conversion is complete.
if (!defined(v8_experimental_extra_library_files)) {
v8_experimental_extra_library_files = [
"//test/cctest/test-experimental-extra.js",
]
}
if (defined(v8_enable_gdbjit_default)) {
v8_enable_gdbjit = v8_enable_gdbjit_default
} else {
v8_enable_gdbjit = false
v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64" ||
v8_current_cpu == "x87") && (is_linux || is_mac)) ||
(v8_current_cpu == "ppc64" && is_linux)
}
}
......
......@@ -2,24 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/v8_target_cpu.gni")
# This file should be empty.
if (((v8_current_cpu == "x86" || v8_current_cpu == "x64" ||
v8_current_cpu == "x87") && (is_linux || is_mac)) ||
(v8_current_cpu == "ppc64" && is_linux)) {
v8_enable_gdbjit_default = true
}
v8_imminent_deprecation_warnings_default = true
# Add simple extras solely for the purpose of the cctests.
v8_extra_library_files = [ "//test/cctest/test-extra.js" ]
v8_experimental_extra_library_files =
[ "//test/cctest/test-experimental-extra.js" ]
v8_enable_inspector_override = true
declare_args() {
# Use static libraries instead of source_sets.
v8_static_library = false
}
# TODO(brettw) http://crbug.com/684096 Remove this when all callers are updated
# to use the new build overrides system.
......@@ -35,8 +35,19 @@ declare_args() {
# add a dependency on the ICU library.
v8_enable_i18n_support = true
# Enable inspector. See include/v8-inspector.h.
v8_enable_inspector = v8_enable_inspector_override
# TODO(brettw) http://crbug.com/684096 Remove the define condition and the
# v8_enable_inspector_override variable when the build_override conversion is
# complete. This value should just default to true.
if (defined(v8_enable_inspector_override)) {
# Enable inspector. See include/v8-inspector.h.
v8_enable_inspector = v8_enable_inspector_override
} else {
# Enable inspector. See include/v8-inspector.h.
v8_enable_inspector = true
}
# Use static libraries instead of source_sets.
v8_static_library = false
}
if (v8_use_external_startup_data == "") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment