OLD | NEW |
---|---|
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/sanitizers/sanitizers.gni") | 5 import("//build/config/sanitizers/sanitizers.gni") |
6 import("//build/config/win/visual_studio_version.gni") | 6 import("//build/config/win/visual_studio_version.gni") |
7 import("//build/toolchain/goma.gni") | 7 import("//build/toolchain/goma.gni") |
8 import("//build/toolchain/toolchain.gni") | 8 import("//build/toolchain/toolchain.gni") |
9 | 9 |
10 # Should only be running on Windows. | 10 # Should only be running on Windows. |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
231 } | 231 } |
232 | 232 |
233 # When invoking this toolchain not as the default one, these args will be | 233 # When invoking this toolchain not as the default one, these args will be |
234 # passed to the build. They are ignored when this is the default toolchain. | 234 # passed to the build. They are ignored when this is the default toolchain. |
235 toolchain_args() { | 235 toolchain_args() { |
236 current_cpu = invoker.toolchain_cpu | 236 current_cpu = invoker.toolchain_cpu |
237 if (defined(invoker.toolchain_os)) { | 237 if (defined(invoker.toolchain_os)) { |
238 current_os = invoker.toolchain_os | 238 current_os = invoker.toolchain_os |
239 } | 239 } |
240 | 240 |
241 forward_variables_from(invoker, | 241 if (defined(invoker.is_clang)) { |
242 [ | 242 is_clang = invoker.is_clang |
243 "is_clang", | 243 } |
244 "is_component_build", | 244 if (defined(invoker.is_component_build)) { |
245 ]) | 245 is_component_build = invoker.is_component_build |
246 } | |
Dirk Pranke
2016/05/03 17:48:50
I'm confused; isn't this exactly the same?
brettw
2016/05/03 18:00:43
With the new changes to forward_variables_from, it
Dirk Pranke
2016/05/03 20:06:33
Ah, right, I was thinking they weren't already in
| |
246 | 247 |
247 # This value needs to be passed through unchanged. | 248 # This value needs to be passed through unchanged. |
248 host_toolchain = host_toolchain | 249 host_toolchain = host_toolchain |
249 } | 250 } |
250 } | 251 } |
251 } | 252 } |
252 | 253 |
253 if (host_os == "win") { | 254 if (host_os == "win") { |
254 clang_cl = "clang-cl.exe" | 255 clang_cl = "clang-cl.exe" |
255 } else { | 256 } else { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
306 goma_prefix = invoker.goma_prefix | 307 goma_prefix = invoker.goma_prefix |
307 x64_toolchain_data = invoker.x64_toolchain_data | 308 x64_toolchain_data = invoker.x64_toolchain_data |
308 clang_cl = invoker.clang_cl | 309 clang_cl = invoker.clang_cl |
309 | 310 |
310 msvc_toolchain(target_name) { | 311 msvc_toolchain(target_name) { |
311 environment = "environment.x64" | 312 environment = "environment.x64" |
312 toolchain_cpu = "x64" | 313 toolchain_cpu = "x64" |
313 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" | 314 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" |
314 is_clang = false | 315 is_clang = false |
315 | 316 |
316 forward_variables_from(invoker, [ "is_component_build" ]) | 317 if (defined(invoker.is_component_build)) { |
318 is_component_build = invoker.is_component_build | |
319 } | |
317 } | 320 } |
318 | 321 |
319 msvc_toolchain("clang_" + target_name) { | 322 msvc_toolchain("clang_" + target_name) { |
320 environment = "environment.x64" | 323 environment = "environment.x64" |
321 toolchain_cpu = "x64" | 324 toolchain_cpu = "x64" |
322 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 325 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
323 root_build_dir) | 326 root_build_dir) |
324 cl = "${goma_prefix}$prefix/${clang_cl}" | 327 cl = "${goma_prefix}$prefix/${clang_cl}" |
325 toolchain_os = "win" | 328 toolchain_os = "win" |
326 is_clang = true | 329 is_clang = true |
327 | 330 |
328 forward_variables_from(invoker, [ "is_component_build" ]) | 331 if (defined(invoker.is_component_build)) { |
332 is_component_build = invoker.is_component_build | |
333 } | |
329 } | 334 } |
330 } | 335 } |
331 | 336 |
332 win_x64_toolchains("x64") { | 337 win_x64_toolchains("x64") { |
333 # TODO(mcgrathr): These assignments are only required because of | 338 # TODO(mcgrathr): These assignments are only required because of |
334 # crbug.com/395883. Drop them if that ever gets fixed in GN. | 339 # crbug.com/395883. Drop them if that ever gets fixed in GN. |
335 concurrent_links = concurrent_links | 340 concurrent_links = concurrent_links |
336 goma_prefix = goma_prefix | 341 goma_prefix = goma_prefix |
337 x64_toolchain_data = x64_toolchain_data | 342 x64_toolchain_data = x64_toolchain_data |
338 } | 343 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
371 | 376 |
372 msvc_toolchain("winrt_x64") { | 377 msvc_toolchain("winrt_x64") { |
373 environment = "environment.winrt_x64" | 378 environment = "environment.winrt_x64" |
374 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" | 379 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" |
375 is_clang = false | 380 is_clang = false |
376 | 381 |
377 toolchain_cpu = "x64" | 382 toolchain_cpu = "x64" |
378 toolchain_os = current_os | 383 toolchain_os = current_os |
379 } | 384 } |
380 } | 385 } |
OLD | NEW |