| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 # unsupported os/cpu combinations as early as possible. | 149 # unsupported os/cpu combinations as early as possible. |
| 150 | 150 |
| 151 if (host_toolchain == "") { | 151 if (host_toolchain == "") { |
| 152 # This should only happen in the top-level context. | 152 # This should only happen in the top-level context. |
| 153 # In a specific toolchain context, the toolchain_args() | 153 # In a specific toolchain context, the toolchain_args() |
| 154 # block should have propagated a value down. | 154 # block should have propagated a value down. |
| 155 # TODO(dpranke): Add some sort of assert here that verifies that | 155 # TODO(dpranke): Add some sort of assert here that verifies that |
| 156 # no toolchain omitted host_toolchain from its toolchain_args(). | 156 # no toolchain omitted host_toolchain from its toolchain_args(). |
| 157 | 157 |
| 158 if (host_os == "linux") { | 158 if (host_os == "linux") { |
| 159 if (target_os != "linux") { | 159 if (target_os == "android") { |
| 160 # TODO(dpranke) - is_clang normally applies only to the target | 160 # We want android builds to use clang for the host toolchains, |
| 161 # build, and there is no way to indicate that you want to override | 161 # but for CrOS we want is_clang to apply to both the target and host. |
| 162 # it for both the target build *and* the host build. Do we need to | |
| 163 # support this? | |
| 164 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" | 162 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" |
| 165 } else if (is_clang) { | 163 } else if (is_clang) { |
| 166 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" | 164 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" |
| 167 } else { | 165 } else { |
| 168 host_toolchain = "//build/toolchain/linux:$host_cpu" | 166 host_toolchain = "//build/toolchain/linux:$host_cpu" |
| 169 } | 167 } |
| 170 } else if (host_os == "mac") { | 168 } else if (host_os == "mac") { |
| 171 host_toolchain = "//build/toolchain/mac:clang_$host_cpu" | 169 host_toolchain = "//build/toolchain/mac:clang_$host_cpu" |
| 172 } else if (host_os == "win") { | 170 } else if (host_os == "win") { |
| 173 # TODO(crbug.com/467159): win cross-compiles don't actually work yet, so | 171 # TODO(crbug.com/467159): win cross-compiles don't actually work yet, so |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 forward_variables_from(invoker, "*", [ "visibility" ]) | 618 forward_variables_from(invoker, "*", [ "visibility" ]) |
| 621 | 619 |
| 622 # All shared libraries must have the sanitizer deps to properly link in | 620 # All shared libraries must have the sanitizer deps to properly link in |
| 623 # asan mode (this target will be empty in other cases). | 621 # asan mode (this target will be empty in other cases). |
| 624 if (!defined(deps)) { | 622 if (!defined(deps)) { |
| 625 deps = [] | 623 deps = [] |
| 626 } | 624 } |
| 627 deps += [ "//build/config/sanitizers:deps" ] | 625 deps += [ "//build/config/sanitizers:deps" ] |
| 628 } | 626 } |
| 629 } | 627 } |
| OLD | NEW |