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/clang/clang.gni") | 5 import("//build/config/clang/clang.gni") |
6 import("//build/config/compiler/compiler.gni") | 6 import("//build/config/compiler/compiler.gni") |
7 import("//build/config/sanitizers/sanitizers.gni") | 7 import("//build/config/sanitizers/sanitizers.gni") |
8 import("//build/config/win/visual_studio_version.gni") | 8 import("//build/config/win/visual_studio_version.gni") |
9 import("//build/toolchain/goma.gni") | 9 import("//build/toolchain/goma.gni") |
10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 visual_studio_path, | 349 visual_studio_path, |
350 gyp_win_tool_path, | 350 gyp_win_tool_path, |
351 windows_sdk_path, | 351 windows_sdk_path, |
352 visual_studio_runtime_dirs, | 352 visual_studio_runtime_dirs, |
353 "x64", | 353 "x64", |
354 "${sys_include_prefix}", | 354 "${sys_include_prefix}", |
355 ], | 355 ], |
356 "scope") | 356 "scope") |
357 | 357 |
358 template("win_x64_toolchains") { | 358 template("win_x64_toolchains") { |
359 # TODO(mcgrathr): These assignments are only required because of | |
360 # crbug.com/395883. Drop them if that ever gets fixed in GN. | |
361 goma_prefix = invoker.goma_prefix | |
362 x64_toolchain_data = invoker.x64_toolchain_data | |
363 clang_cl = invoker.clang_cl | |
364 | |
365 msvc_toolchain(target_name) { | 359 msvc_toolchain(target_name) { |
366 environment = "environment.x64" | 360 environment = "environment.x64" |
367 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" | 361 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" |
368 | 362 |
369 toolchain_args = { | 363 toolchain_args = { |
370 if (defined(invoker.toolchain_args)) { | 364 if (defined(invoker.toolchain_args)) { |
371 forward_variables_from(invoker.toolchain_args, "*") | 365 forward_variables_from(invoker.toolchain_args, "*") |
372 } | 366 } |
373 is_clang = false | 367 is_clang = false |
374 current_cpu = "x64" | 368 current_cpu = "x64" |
(...skipping 10 matching lines...) Expand all Loading... |
385 if (defined(invoker.toolchain_args)) { | 379 if (defined(invoker.toolchain_args)) { |
386 forward_variables_from(invoker.toolchain_args, "*") | 380 forward_variables_from(invoker.toolchain_args, "*") |
387 } | 381 } |
388 is_clang = true | 382 is_clang = true |
389 current_cpu = "x64" | 383 current_cpu = "x64" |
390 } | 384 } |
391 } | 385 } |
392 } | 386 } |
393 | 387 |
394 win_x64_toolchains("x64") { | 388 win_x64_toolchains("x64") { |
395 # TODO(mcgrathr): These assignments are only required because of | 389 toolchain_args = { |
396 # crbug.com/395883. Drop them if that ever gets fixed in GN. | 390 # Use the defaults. |
397 goma_prefix = goma_prefix | 391 } |
398 x64_toolchain_data = x64_toolchain_data | |
399 } | 392 } |
400 | 393 |
401 # The nacl_win64 toolchain is nearly identical to the plain x64 toolchain. | 394 # The nacl_win64 toolchain is nearly identical to the plain x64 toolchain. |
402 # It's used solely for building nacl64.exe (//components/nacl/broker:nacl64). | 395 # It's used solely for building nacl64.exe (//components/nacl/broker:nacl64). |
403 # The only reason it's a separate toolchain is so that it can force | 396 # The only reason it's a separate toolchain is so that it can force |
404 # is_component_build to false in the toolchain_args() block, because | 397 # is_component_build to false in the toolchain_args() block, because |
405 # building nacl64.exe in component style does not work. | 398 # building nacl64.exe in component style does not work. |
406 win_x64_toolchains("nacl_win64") { | 399 win_x64_toolchains("nacl_win64") { |
407 # TODO(mcgrathr): These assignments are only required because of | |
408 # crbug.com/395883. Drop them if that ever gets fixed in GN. | |
409 goma_prefix = goma_prefix | |
410 x64_toolchain_data = x64_toolchain_data | |
411 clang_cl = clang_cl | |
412 | |
413 toolchain_args = { | 400 toolchain_args = { |
414 is_component_build = false | 401 is_component_build = false |
415 } | 402 } |
416 } | 403 } |
417 | 404 |
418 # WinRT toolchains. Only define these when targeting them. | 405 # WinRT toolchains. Only define these when targeting them. |
419 # | 406 # |
420 # NOTE: This is currently broken because it references vc_bin_dir. brettw@ | 407 # NOTE: This is currently broken because it references vc_bin_dir. brettw@ |
421 # changed this around a bit, and I don't know what this should be set to | 408 # changed this around a bit, and I don't know what this should be set to |
422 # in terms of what setup_toolchain returns for a certain CPU architecture. | 409 # in terms of what setup_toolchain returns for a certain CPU architecture. |
(...skipping 12 matching lines...) Expand all Loading... |
435 msvc_toolchain("winrt_x64") { | 422 msvc_toolchain("winrt_x64") { |
436 environment = "environment.winrt_x64" | 423 environment = "environment.winrt_x64" |
437 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" | 424 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" |
438 | 425 |
439 toolchain_args = { | 426 toolchain_args = { |
440 is_clang = false | 427 is_clang = false |
441 current_cpu = "x64" | 428 current_cpu = "x64" |
442 } | 429 } |
443 } | 430 } |
444 } | 431 } |
OLD | NEW |