| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 if (is_clang) { | 218 if (is_clang) { |
| 219 _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" | 219 _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" |
| 220 } else { | 220 } else { |
| 221 _default_toolchain = "//build/toolchain/linux:$target_cpu" | 221 _default_toolchain = "//build/toolchain/linux:$target_cpu" |
| 222 } | 222 } |
| 223 } else if (target_os == "mac") { | 223 } else if (target_os == "mac") { |
| 224 assert(host_os == "mac", "Mac cross-compiles are unsupported.") | 224 assert(host_os == "mac", "Mac cross-compiles are unsupported.") |
| 225 _default_toolchain = host_toolchain | 225 _default_toolchain = host_toolchain |
| 226 } else if (target_os == "win") { | 226 } else if (target_os == "win") { |
| 227 # On Windows we use the same toolchain for host and target by default. | 227 # On Windows we use the same toolchain for host and target by default. |
| 228 assert(target_os == host_os, "Win cross-compiles only work on win hosts.") | 228 #assert(target_os == host_os, "Win cross-compiles only work on win hosts.") |
| 229 # TODO(thakis): Getting this working requires definiting a clang_x86 toolchain |
| 230 # on mac. |
| 231 assert(host_os != "mac" || target_cpu != "x86", |
| 232 "Doing 32-bit Windows builds on Mac does not yet work, target 64-bit") |
| 229 if (is_clang) { | 233 if (is_clang) { |
| 230 _default_toolchain = "//build/toolchain/win:clang_$target_cpu" | 234 _default_toolchain = "//build/toolchain/win:clang_$target_cpu" |
| 231 } else { | 235 } else { |
| 232 _default_toolchain = "//build/toolchain/win:$target_cpu" | 236 _default_toolchain = "//build/toolchain/win:$target_cpu" |
| 233 } | 237 } |
| 234 } else if (target_os == "winrt_81" || target_os == "winrt_81_phone" || | 238 } else if (target_os == "winrt_81" || target_os == "winrt_81_phone" || |
| 235 target_os == "winrt_10") { | 239 target_os == "winrt_10") { |
| 236 _default_toolchain = "//build/toolchain/win:winrt_$target_cpu" | 240 _default_toolchain = "//build/toolchain/win:winrt_$target_cpu" |
| 237 } else { | 241 } else { |
| 238 assert(false, "Unsupported target_os: $target_os") | 242 assert(false, "Unsupported target_os: $target_os") |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 forward_variables_from(invoker, "*", [ "visibility" ]) | 662 forward_variables_from(invoker, "*", [ "visibility" ]) |
| 659 | 663 |
| 660 # All shared libraries must have the sanitizer deps to properly link in | 664 # All shared libraries must have the sanitizer deps to properly link in |
| 661 # asan mode (this target will be empty in other cases). | 665 # asan mode (this target will be empty in other cases). |
| 662 if (!defined(deps)) { | 666 if (!defined(deps)) { |
| 663 deps = [] | 667 deps = [] |
| 664 } | 668 } |
| 665 deps += [ "//build/config/sanitizers:deps" ] | 669 deps += [ "//build/config/sanitizers:deps" ] |
| 666 } | 670 } |
| 667 } | 671 } |
| OLD | NEW |