| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 if (target_os == "android") { | 198 if (target_os == "android") { |
| 199 assert(host_os == "linux" || host_os == "mac", | 199 assert(host_os == "linux" || host_os == "mac", |
| 200 "Android builds are only supported on Linux and Mac hosts.") | 200 "Android builds are only supported on Linux and Mac hosts.") |
| 201 if (is_clang) { | 201 if (is_clang) { |
| 202 _default_toolchain = "//build/toolchain/android:clang_$target_cpu" | 202 _default_toolchain = "//build/toolchain/android:clang_$target_cpu" |
| 203 } else { | 203 } else { |
| 204 _default_toolchain = "//build/toolchain/android:$target_cpu" | 204 _default_toolchain = "//build/toolchain/android:$target_cpu" |
| 205 } | 205 } |
| 206 } else if (target_os == "chromeos") { | 206 } else if (target_os == "chromeos") { |
| 207 # See comments in build/toolchain/cros/BUILD.gn about board compiles. | |
| 208 assert(host_os == "linux", | 207 assert(host_os == "linux", |
| 209 "ChromeOS builds are only supported on Linux hosts.") | 208 "ChromeOS builds are only supported on Linux hosts.") |
| 210 if (is_clang) { | 209 _default_toolchain = "//build/toolchain/cros:target" |
| 211 _default_toolchain = "//build/toolchain/cros:clang_target" | |
| 212 } else { | |
| 213 _default_toolchain = "//build/toolchain/cros:target" | |
| 214 } | |
| 215 } else if (target_os == "ios") { | 210 } else if (target_os == "ios") { |
| 216 _default_toolchain = "//build/toolchain/mac:ios_clang_$target_cpu" | 211 _default_toolchain = "//build/toolchain/mac:ios_clang_$target_cpu" |
| 217 } else if (target_os == "linux") { | 212 } else if (target_os == "linux") { |
| 218 if (is_clang) { | 213 if (is_clang) { |
| 219 _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" | 214 _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" |
| 220 } else { | 215 } else { |
| 221 _default_toolchain = "//build/toolchain/linux:$target_cpu" | 216 _default_toolchain = "//build/toolchain/linux:$target_cpu" |
| 222 } | 217 } |
| 223 } else if (target_os == "mac") { | 218 } else if (target_os == "mac") { |
| 224 assert(host_os == "mac", "Mac cross-compiles are unsupported.") | 219 assert(host_os == "mac", "Mac cross-compiles are unsupported.") |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 forward_variables_from(invoker, "*", [ "visibility" ]) | 657 forward_variables_from(invoker, "*", [ "visibility" ]) |
| 663 | 658 |
| 664 # All shared libraries must have the sanitizer deps to properly link in | 659 # All shared libraries must have the sanitizer deps to properly link in |
| 665 # asan mode (this target will be empty in other cases). | 660 # asan mode (this target will be empty in other cases). |
| 666 if (!defined(deps)) { | 661 if (!defined(deps)) { |
| 667 deps = [] | 662 deps = [] |
| 668 } | 663 } |
| 669 deps += [ "//build/config/sanitizers:deps" ] | 664 deps += [ "//build/config/sanitizers:deps" ] |
| 670 } | 665 } |
| 671 } | 666 } |
| OLD | NEW |