Index: build/toolchain/win/BUILD.gn |
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn |
index 4fb72797d5f279cccb8b68c257a25fccd33725e0..5d1340ce7f58eecce5bbb6a7eb42824ff6fd9fe9 100644 |
--- a/build/toolchain/win/BUILD.gn |
+++ b/build/toolchain/win/BUILD.gn |
@@ -225,9 +225,12 @@ template("msvc_toolchain") { |
if (defined(invoker.toolchain_os)) { |
current_os = invoker.toolchain_os |
} |
- if (defined(invoker.is_clang)) { |
- is_clang = invoker.is_clang |
- } |
+ |
+ forward_variables_from(invoker, |
+ [ |
+ "is_clang", |
+ "is_component_build", |
+ ]) |
# This value needs to be passed through unchanged. |
host_toolchain = host_toolchain |
@@ -284,21 +287,56 @@ x64_toolchain_data = exec_script("setup_toolchain.py", |
], |
"scope") |
-msvc_toolchain("x64") { |
- environment = "environment.x64" |
- toolchain_cpu = "x64" |
- cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" |
- is_clang = false |
+template("win_x64_toolchains") { |
+ # TODO(mcgrathr): These assignments are only required because of |
+ # crbug.com/395883. Drop them if that ever gets fixed in GN. |
+ concurrent_links = invoker.concurrent_links |
+ goma_prefix = invoker.goma_prefix |
+ x64_toolchain_data = invoker.x64_toolchain_data |
+ |
+ msvc_toolchain(target_name) { |
+ environment = "environment.x64" |
+ toolchain_cpu = "x64" |
+ cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" |
+ is_clang = false |
+ |
+ forward_variables_from(invoker, [ "is_component_build" ]) |
+ } |
+ |
+ msvc_toolchain("clang_" + target_name) { |
+ environment = "environment.x64" |
+ toolchain_cpu = "x64" |
+ prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
+ root_build_dir) |
+ cl = "${goma_prefix}$prefix/${clang_cl}" |
+ toolchain_os = "win" |
+ is_clang = true |
+ |
+ forward_variables_from(invoker, [ "is_component_build" ]) |
+ } |
+} |
+ |
+win_x64_toolchains("x64") { |
+ # TODO(mcgrathr): These assignments are only required because of |
+ # crbug.com/395883. Drop them if that ever gets fixed in GN. |
+ concurrent_links = concurrent_links |
+ goma_prefix = goma_prefix |
+ x64_toolchain_data = x64_toolchain_data |
} |
-msvc_toolchain("clang_x64") { |
- environment = "environment.x64" |
- toolchain_cpu = "x64" |
- prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
- root_build_dir) |
- cl = "${goma_prefix}$prefix/${clang_cl}" |
- toolchain_os = "win" |
- is_clang = true |
+# The nacl_win64 toolchain is nearly identical to the plain x64 toolchain. |
+# It's used solely for building nacl64.exe (//components/nacl/broker:nacl64). |
+# The only reason it's a separate toolchain is so that it can force |
+# is_component_build to false in the toolchain_args() block, because |
+# building nacl64.exe in component style does not work. |
+win_x64_toolchains("nacl_win64") { |
+ is_component_build = false |
+ |
+ # TODO(mcgrathr): These assignments are only required because of |
+ # crbug.com/395883. Drop them if that ever gets fixed in GN. |
+ concurrent_links = concurrent_links |
+ goma_prefix = goma_prefix |
+ x64_toolchain_data = x64_toolchain_data |
Dirk Pranke
2016/01/26 01:42:41
I'm not actually convinced that using the win_x64_
|
} |
# WinRT toolchains. Only define these when targeting them. |