Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1180)

Unified Diff: build/toolchain/gcc_toolchain.gni

Issue 2116183002: Land chromium-side work to clean up handling of v8_target_cpu in the GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix missing import Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/v8_target_cpu.gni ('k') | build/toolchain/linux/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/gcc_toolchain.gni
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni
index 3fe003496f4f4f5628eafe21661f378b6e1fb055..5ecabe5cdcef1cc7278d6bfe92d18203b23d2583 100644
--- a/build/toolchain/gcc_toolchain.gni
+++ b/build/toolchain/gcc_toolchain.gni
@@ -5,6 +5,7 @@
import("//build/config/clang/clang.gni")
import("//build/config/nacl/config.gni")
import("//build/config/sanitizers/sanitizers.gni")
+import("//build/config/v8_target_cpu.gni")
import("//build/toolchain/cc_wrapper.gni")
import("//build/toolchain/goma.gni")
import("//build/toolchain/toolchain.gni")
@@ -99,6 +100,9 @@ import("//build/toolchain/concurrent_links.gni")
# - use_gold
# Override the global use_gold setting, useful if the particular
# toolchain has a custom link step that is not actually using Gold.
+# - v8_toolchain_cpu
+# If defined, set v8_current_cpu to this, else set v8_current_cpu
+# to current_cpu.
template("gcc_toolchain") {
toolchain(target_name) {
assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value")
@@ -465,6 +469,17 @@ template("gcc_toolchain") {
if (defined(invoker.use_sysroot)) {
use_sysroot = invoker.use_sysroot
}
+ if (defined(invoker.v8_toolchain_cpu)) {
+ v8_current_cpu = invoker.v8_toolchain_cpu
+ } else {
+ v8_current_cpu = current_cpu
+ }
+
+ # TODO(crbug.com/625353) - Delete after v8 has been updated
+ # to only refer to v8_current_cpu. Until then, we need to make
+ # sure that v8_current_cpu always has the same value as v8_target_cpu,
+ # so that //build defines evaluate the way v8 is expecting them to.
+ v8_current_cpu = v8_target_cpu
# Disable sanitizers for non-default toolchains.
is_asan = false
@@ -523,10 +538,11 @@ template("clang_toolchain") {
forward_variables_from(invoker,
[
+ "strip",
"toolchain_cpu",
"toolchain_os",
"use_gold",
- "strip",
+ "v8_toolchain_cpu",
])
if (defined(invoker.use_debug_fission)) {
« no previous file with comments | « build/config/v8_target_cpu.gni ('k') | build/toolchain/linux/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698