[gn] Make v8_target_arch a GN declare_arg()
There are bots on the chromium.lkgr waterfall that need to be able to set v8_target_arch to "arm" while the rest of the target build is "x86". This CL makes that argument a declare_arg(), so that we can do that. BUG=chromium:605732,chromium:474921 NOTRY=true Review-Url: https://codereview.chromium.org/2007843002 Cr-Commit-Position: refs/heads/master@{#36464}
This commit is contained in:
parent
02c8b6f7f0
commit
3be95b712c
19
BUILD.gn
19
BUILD.gn
@ -11,8 +11,7 @@ if (is_android) {
|
||||
import("//build/config/android/rules.gni")
|
||||
}
|
||||
|
||||
# Because standalone V8 builds are not supported, assume this is part of a
|
||||
# Chromium build.
|
||||
import("gni/v8.gni")
|
||||
import("//build_overrides/v8.gni")
|
||||
|
||||
import("snapshot_toolchain.gni")
|
||||
@ -70,13 +69,15 @@ declare_args() {
|
||||
v8_random_seed = "314159265"
|
||||
v8_toolset_for_shell = "host"
|
||||
|
||||
if (is_msan) {
|
||||
# Running the V8-generated code on an ARM simulator is a powerful hack that
|
||||
# allows the tool to see the memory accesses from JITted code. Without this
|
||||
# flag, JS code causes false positive reports from MSan.
|
||||
v8_target_arch = "arm64"
|
||||
} else {
|
||||
v8_target_arch = target_cpu
|
||||
if (v8_target_arch == "") {
|
||||
if (is_msan) {
|
||||
# Running the V8-generated code on an ARM simulator is a powerful hack that
|
||||
# allows the tool to see the memory accesses from JITted code. Without this
|
||||
# flag, JS code causes false positive reports from MSan.
|
||||
v8_target_arch = "arm64"
|
||||
} else {
|
||||
v8_target_arch = target_cpu
|
||||
}
|
||||
}
|
||||
|
||||
if (v8_use_snapshot && v8_use_external_startup_data) {
|
||||
|
@ -4,16 +4,12 @@
|
||||
|
||||
import("//build/config/features.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//gni/v8.gni")
|
||||
|
||||
if (is_android) {
|
||||
import("//build/config/android/config.gni")
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
# V8 generates code for this architecture.
|
||||
v8_target_arch = target_cpu
|
||||
}
|
||||
|
||||
if (((v8_target_arch == "ia32" ||
|
||||
v8_target_arch == "x64" ||
|
||||
v8_target_arch=="x87") &&
|
||||
|
9
gni/v8.gni
Normal file
9
gni/v8.gni
Normal file
@ -0,0 +1,9 @@
|
||||
# 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.
|
||||
|
||||
declare_args() {
|
||||
# V8 generates code for this architecture. If v8_target_arch differs from
|
||||
# target_cpu, a simulator will be run.
|
||||
v8_target_arch = ""
|
||||
}
|
Loading…
Reference in New Issue
Block a user