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

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

Issue 1946433002: Windows GN clobber error fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « 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 beee0781d673a1ae2e453d07df65371339009c99..dfd1e84be24d52b5eb0ca60a554e9f02d9660db4 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -238,11 +238,15 @@ template("msvc_toolchain") {
current_os = invoker.toolchain_os
}
- forward_variables_from(invoker,
- [
- "is_clang",
- "is_component_build",
- ])
+ # These share a name with global variables that are already defined, and
+ # forward_variables_from won't clobber the existing value, so we need to
+ # set it explicitly.
+ if (defined(invoker.is_clang)) {
+ is_clang = invoker.is_clang
+ }
+ if (defined(invoker.is_component_build)) {
+ is_component_build = invoker.is_component_build
+ }
# This value needs to be passed through unchanged.
host_toolchain = host_toolchain
@@ -313,7 +317,11 @@ template("win_x64_toolchains") {
cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\""
is_clang = false
- forward_variables_from(invoker, [ "is_component_build" ])
+ # This shares a name with a global and forward_variables_from won't clobber
+ # the existing value, so we need to set it explicitly.
+ if (defined(invoker.is_component_build)) {
+ is_component_build = invoker.is_component_build
+ }
}
msvc_toolchain("clang_" + target_name) {
@@ -325,7 +333,11 @@ template("win_x64_toolchains") {
toolchain_os = "win"
is_clang = true
- forward_variables_from(invoker, [ "is_component_build" ])
+ # This shares a name with a global and forward_variables_from won't clobber
+ # the existing value, so we need to set it explicitly.
+ if (defined(invoker.is_component_build)) {
+ is_component_build = invoker.is_component_build
+ }
}
}
« 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