| 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 if (target_os == "") { | 5 if (target_os == "") { |
| 6 target_os = host_os | 6 target_os = host_os |
| 7 } | 7 } |
| 8 | 8 |
| 9 if (target_cpu == "") { | 9 if (target_cpu == "") { |
| 10 if (target_os == "android") { | 10 if (target_os == "android") { |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 # TOOLCHAIN SETUP | 517 # TOOLCHAIN SETUP |
| 518 # ============================================================================== | 518 # ============================================================================== |
| 519 # | 519 # |
| 520 # Here we set the default toolchain, as well as the variable host_toolchain | 520 # Here we set the default toolchain, as well as the variable host_toolchain |
| 521 # which will identify the toolchain corresponding to the local system when | 521 # which will identify the toolchain corresponding to the local system when |
| 522 # doing cross-compiles. When not cross-compiling, this will be the same as the | 522 # doing cross-compiles. When not cross-compiling, this will be the same as the |
| 523 # default toolchain. | 523 # default toolchain. |
| 524 | 524 |
| 525 if (is_win) { | 525 if (is_win) { |
| 526 # On windows we use the same toolchain for host and target by default. | 526 # On windows we use the same toolchain for host and target by default. |
| 527 # TODO(dpranke): rename the toolchains to x64 and x86 to match current_cpu. | 527 if (is_clang) { |
| 528 if (current_cpu == "x64") { | 528 host_toolchain = "//build/toolchain/win:clang_$current_cpu" |
| 529 host_toolchain = "//build/toolchain/win:64" | 529 } else { |
| 530 } else if (current_cpu == "x86") { | 530 host_toolchain = "//build/toolchain/win:$current_cpu" |
| 531 host_toolchain = "//build/toolchain/win:32" | |
| 532 } | 531 } |
| 533 set_default_toolchain("$host_toolchain") | 532 set_default_toolchain("$host_toolchain") |
| 534 } else if (is_android) { | 533 } else if (is_android) { |
| 535 if (host_os == "linux") { | 534 if (host_os == "linux") { |
| 536 # Use clang for the x86/64 Linux host builds. | 535 # Use clang for the x86/64 Linux host builds. |
| 537 if (host_cpu == "x86" || host_cpu == "x64") { | 536 if (host_cpu == "x86" || host_cpu == "x64") { |
| 538 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" | 537 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" |
| 539 } else { | 538 } else { |
| 540 host_toolchain = "//build/toolchain/linux:$host_cpu" | 539 host_toolchain = "//build/toolchain/linux:$host_cpu" |
| 541 } | 540 } |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 } | 769 } |
| 771 if (defined(invoker.testonly)) { | 770 if (defined(invoker.testonly)) { |
| 772 testonly = invoker.testonly | 771 testonly = invoker.testonly |
| 773 } | 772 } |
| 774 if (defined(invoker.visibility)) { | 773 if (defined(invoker.visibility)) { |
| 775 visibility = invoker.visibility | 774 visibility = invoker.visibility |
| 776 } | 775 } |
| 777 } | 776 } |
| 778 } | 777 } |
| 779 } | 778 } |
| OLD | NEW |