Commit 3be95b71 authored by machenbach's avatar machenbach Committed by Commit bot

[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}
parent 02c8b6f7
...@@ -11,8 +11,7 @@ if (is_android) { ...@@ -11,8 +11,7 @@ if (is_android) {
import("//build/config/android/rules.gni") import("//build/config/android/rules.gni")
} }
# Because standalone V8 builds are not supported, assume this is part of a import("gni/v8.gni")
# Chromium build.
import("//build_overrides/v8.gni") import("//build_overrides/v8.gni")
import("snapshot_toolchain.gni") import("snapshot_toolchain.gni")
...@@ -70,13 +69,15 @@ declare_args() { ...@@ -70,13 +69,15 @@ declare_args() {
v8_random_seed = "314159265" v8_random_seed = "314159265"
v8_toolset_for_shell = "host" v8_toolset_for_shell = "host"
if (is_msan) { if (v8_target_arch == "") {
# Running the V8-generated code on an ARM simulator is a powerful hack that if (is_msan) {
# allows the tool to see the memory accesses from JITted code. Without this # Running the V8-generated code on an ARM simulator is a powerful hack that
# flag, JS code causes false positive reports from MSan. # allows the tool to see the memory accesses from JITted code. Without this
v8_target_arch = "arm64" # flag, JS code causes false positive reports from MSan.
} else { v8_target_arch = "arm64"
v8_target_arch = target_cpu } else {
v8_target_arch = target_cpu
}
} }
if (v8_use_snapshot && v8_use_external_startup_data) { if (v8_use_snapshot && v8_use_external_startup_data) {
......
...@@ -4,16 +4,12 @@ ...@@ -4,16 +4,12 @@
import("//build/config/features.gni") import("//build/config/features.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//gni/v8.gni")
if (is_android) { if (is_android) {
import("//build/config/android/config.gni") import("//build/config/android/config.gni")
} }
declare_args() {
# V8 generates code for this architecture.
v8_target_arch = target_cpu
}
if (((v8_target_arch == "ia32" || if (((v8_target_arch == "ia32" ||
v8_target_arch == "x64" || v8_target_arch == "x64" ||
v8_target_arch=="x87") && v8_target_arch=="x87") &&
......
# 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 = ""
}
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