| 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 # ============================================================================= | 5 # ============================================================================= |
| 6 # PLATFORM SELECTION | 6 # PLATFORM SELECTION |
| 7 # ============================================================================= | 7 # ============================================================================= |
| 8 # | 8 # |
| 9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name | 9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name |
| 10 # of the GN thing that encodes combinations of these things. | 10 # of the GN thing that encodes combinations of these things. |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 if (host_cpu == "x86" || host_cpu == "x64") { | 567 if (host_cpu == "x86" || host_cpu == "x64") { |
| 568 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" | 568 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" |
| 569 } else { | 569 } else { |
| 570 host_toolchain = "//build/toolchain/linux:$host_cpu" | 570 host_toolchain = "//build/toolchain/linux:$host_cpu" |
| 571 } | 571 } |
| 572 } else if (host_os == "mac") { | 572 } else if (host_os == "mac") { |
| 573 host_toolchain = "//build/toolchain/mac:clang_$host_cpu" | 573 host_toolchain = "//build/toolchain/mac:clang_$host_cpu" |
| 574 } else { | 574 } else { |
| 575 assert(false, "Unknown host for android cross compile") | 575 assert(false, "Unknown host for android cross compile") |
| 576 } | 576 } |
| 577 set_default_toolchain("//build/toolchain/android:$current_cpu") | 577 if (is_clang) { |
| 578 set_default_toolchain("//build/toolchain/android:clang_$current_cpu") |
| 579 } else { |
| 580 set_default_toolchain("//build/toolchain/android:$current_cpu") |
| 581 } |
| 578 } else if (is_linux) { | 582 } else if (is_linux) { |
| 579 if (is_clang) { | 583 if (is_clang) { |
| 580 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" | 584 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" |
| 581 set_default_toolchain("//build/toolchain/linux:clang_$current_cpu") | 585 set_default_toolchain("//build/toolchain/linux:clang_$current_cpu") |
| 582 } else { | 586 } else { |
| 583 host_toolchain = "//build/toolchain/linux:$host_cpu" | 587 host_toolchain = "//build/toolchain/linux:$host_cpu" |
| 584 set_default_toolchain("//build/toolchain/linux:$current_cpu") | 588 set_default_toolchain("//build/toolchain/linux:$current_cpu") |
| 585 } | 589 } |
| 586 if (is_chromeos && cros_use_custom_toolchain) { | 590 if (is_chromeos && cros_use_custom_toolchain) { |
| 587 set_default_toolchain("//build/toolchain/cros:target") | 591 set_default_toolchain("//build/toolchain/cros:target") |
| (...skipping 30 matching lines...) Expand all Loading... |
| 618 forward_variables_from(invoker, "*") | 622 forward_variables_from(invoker, "*") |
| 619 | 623 |
| 620 # All shared libraries must have the sanitizer deps to properly link in | 624 # All shared libraries must have the sanitizer deps to properly link in |
| 621 # asan mode (this target will be empty in other cases). | 625 # asan mode (this target will be empty in other cases). |
| 622 if (!defined(deps)) { | 626 if (!defined(deps)) { |
| 623 deps = [] | 627 deps = [] |
| 624 } | 628 } |
| 625 deps += [ "//build/config/sanitizers:deps" ] | 629 deps += [ "//build/config/sanitizers:deps" ] |
| 626 } | 630 } |
| 627 } | 631 } |
| OLD | NEW |