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

Unified Diff: build/toolchain/win/BUILD.gn

Issue 1499933004: GN: Fix use of current_cpu in //build/toolchain/win (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/win/BUILD.gn
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
index 11f9328c5115541356b71297e8b4152368ef4b4d..02333532a46932a16dc5b6d8153e673e636ce8d7 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -50,8 +50,8 @@ if (current_toolchain == default_toolchain) {
}
# Parameters:
-# current_cpu: current_cpu to pass as a build arg
-# current_os: current_os to pass as a build arg
+# toolchain_cpu: current_cpu to pass as a build arg
+# toolchain_os: current_os to pass as a build arg
# environment: File name of environment file.
template("msvc_toolchain") {
if (defined(invoker.concurrent_links)) {
@@ -107,7 +107,7 @@ template("msvc_toolchain") {
}
tool("asm") {
- if (current_cpu == "x64") {
+ if (invoker.toolchain_cpu == "x64") {
ml = "ml64.exe"
} else {
ml = "ml.exe"
@@ -221,11 +221,13 @@ template("msvc_toolchain") {
# When invoking this toolchain not as the default one, these args will be
# passed to the build. They are ignored when this is the default toolchain.
toolchain_args() {
- current_cpu = invoker.current_cpu
+ current_cpu = invoker.toolchain_cpu
+ if (defined(invoker.toolchain_os)) {
+ current_os = invoker.toolchain_os
+ }
if (defined(invoker.is_clang)) {
is_clang = invoker.is_clang
}
- current_os = invoker.current_os
# This value needs to be passed through unchanged.
host_toolchain = host_toolchain
@@ -249,18 +251,18 @@ if (target_cpu == "x86") {
msvc_toolchain("x86") {
environment = "environment.x86"
- current_cpu = "x86"
+ toolchain_cpu = "x86"
cl = "${goma_prefix}\"${x86_toolchain_data.vc_bin_dir}/cl.exe\""
is_clang = false
}
msvc_toolchain("clang_x86") {
environment = "environment.x86"
- current_cpu = "x86"
+ toolchain_cpu = "x86"
prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
root_build_dir)
cl = "${goma_prefix}$prefix/clang-cl.exe"
- current_os = "win"
+ toolchain_os = "win"
is_clang = true
}
}
@@ -278,18 +280,18 @@ x64_toolchain_data = exec_script("setup_toolchain.py",
msvc_toolchain("x64") {
environment = "environment.x64"
- current_cpu = "x64"
+ toolchain_cpu = "x64"
cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\""
is_clang = false
}
msvc_toolchain("clang_x64") {
environment = "environment.x64"
- current_cpu = "x64"
+ toolchain_cpu = "x64"
prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
root_build_dir)
cl = "${goma_prefix}$prefix/clang-cl.exe"
- current_os = "win"
+ toolchain_os = "win"
is_clang = true
}
@@ -305,8 +307,8 @@ if (target_os == "winrt_81" || target_os == "winrt_81_phone" ||
cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
is_clang = false
- current_cpu = "x86"
- current_os = current_os
+ toolchain_cpu = "x86"
+ toolchain_os = current_os
}
msvc_toolchain("winrt_x64") {
@@ -314,7 +316,7 @@ if (target_os == "winrt_81" || target_os == "winrt_81_phone" ||
cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
is_clang = false
- current_cpu = "x64"
- current_os = current_os
+ toolchain_cpu = "x64"
+ toolchain_os = current_os
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698