v8/gni/v8.gni
machenbach d3413fa2da Reland of [gn] Switch more linux32 bots to gn (patchset #1 id:1 of https://codereview.chromium.org/2128493002/ )
Reason for revert:
Should be fixed after https://codereview.chromium.org/2123223002/

Original issue's description:
> Revert of [gn] Switch more linux32 bots to gn (patchset #3 id:40001 of https://codereview.chromium.org/2122933002/ )
>
> Reason for revert:
> Breaks test isolation on shared library bot.
>
> Original issue's description:
> > [gn] Switch more linux32 bots to gn
> >
> > This switches nosnap and shared library bots to gn.
> >
> > This also unsets external startup data if no snapshot is
> > used.
> >
> > BUG=chromium:474921
> > NOTRY=true
> >
> > Committed: https://crrev.com/ab4d8fc07d9d35e6fc129098f42aa0317a02244a
> > Cr-Commit-Position: refs/heads/master@{#37546}
>
> TBR=vogelheim@chromium.org,jochen@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:474921
>
> Committed: https://crrev.com/a5fa2984257a50ee9440914c7d1a199f64a86194
> Cr-Commit-Position: refs/heads/master@{#37548}

TBR=vogelheim@chromium.org,jochen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:474921

Review-Url: https://codereview.chromium.org/2126843002
Cr-Commit-Position: refs/heads/master@{#37558}
2016-07-06 15:17:09 +00:00

93 lines
2.8 KiB
Plaintext

# Copyright 2016 the V8 project 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/v8_target_cpu.gni")
import("//build/config/sanitizers/sanitizers.gni")
declare_args() {
# Indicate if valgrind was fetched as a custom deps to make it available on
# swarming.
v8_has_valgrind = false
# Indicate if gcmole was fetched as a hook to make it available on swarming.
v8_gcmole = false
# Turns on compiler optimizations in V8 in Debug build.
v8_optimized_debug = true
# Enable the snapshot feature, for fast context creation.
# http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html
v8_use_snapshot = true
# Use external files for startup data blobs:
# the JS builtins sources and the start snapshot.
v8_use_external_startup_data = ""
}
if (v8_use_external_startup_data == "") {
# If not specified as a gn arg, use external startup data by default if
# a snapshot is used and if we're not on ios.
v8_use_external_startup_data = v8_use_snapshot && !is_ios
}
###############################################################################
# Templates
#
# Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute
# paths for all configs in templates as they are shared in different
# subdirectories.
path_prefix = get_path_info("../", "abspath")
# Common configs to remove or add in all v8 targets.
remove_configs = [ "//build/config/compiler:chromium_code" ]
add_configs = [
"//build/config/compiler:no_chromium_code",
path_prefix + ":features",
path_prefix + ":toolchain",
]
if (is_debug && !v8_optimized_debug) {
remove_configs += [ "//build/config/compiler:default_optimization" ]
add_configs += [ "//build/config/compiler:no_optimize" ]
} else {
remove_configs += [ "//build/config/compiler:default_optimization" ]
# TODO(crbug.com/621335) Rework this so that we don't have the confusion
# between "optimize_speed" and "optimize_max".
if (is_posix && !is_android && !is_nacl && !using_sanitizer) {
add_configs += [ "//build/config/compiler:optimize_speed" ]
} else {
add_configs += [ "//build/config/compiler:optimize_max" ]
}
}
# All templates should be kept in sync.
template("v8_source_set") {
source_set(target_name) {
forward_variables_from(invoker, "*", [ "configs" ])
configs += invoker.configs
configs -= remove_configs
configs += add_configs
}
}
template("v8_executable") {
executable(target_name) {
forward_variables_from(invoker, "*", [ "configs" ])
configs += invoker.configs
configs -= remove_configs
configs += add_configs
}
}
template("v8_component") {
component(target_name) {
forward_variables_from(invoker, "*", [ "configs" ])
configs += invoker.configs
configs -= remove_configs
configs += add_configs
}
}