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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 # TOOLCHAIN SETUP | 330 # TOOLCHAIN SETUP |
331 # ============================================================================== | 331 # ============================================================================== |
332 # | 332 # |
333 # Here we set the default toolchain, as well as the variable host_toolchain | 333 # Here we set the default toolchain, as well as the variable host_toolchain |
334 # which will identify the toolchain corresponding to the local system when | 334 # which will identify the toolchain corresponding to the local system when |
335 # doing cross-compiles. When not cross-compiling, this will be the same as the | 335 # doing cross-compiles. When not cross-compiling, this will be the same as the |
336 # default toolchain. | 336 # default toolchain. |
337 | 337 |
338 if (is_win) { | 338 if (is_win) { |
339 # On windows we use the same toolchain for host and target by default. | 339 # On windows we use the same toolchain for host and target by default. |
340 if (is_clang) { | 340 host_toolchain = "//build/toolchain/win:$current_cpu" |
341 host_toolchain = "//build/toolchain/win:clang_$current_cpu" | |
342 } else { | |
343 host_toolchain = "//build/toolchain/win:$current_cpu" | |
344 } | |
345 set_default_toolchain("$host_toolchain") | 341 set_default_toolchain("$host_toolchain") |
346 } else if (is_android) { | 342 } else if (is_android) { |
347 if (host_os == "linux") { | 343 if (host_os == "linux") { |
348 if (host_cpu == "x86" || host_cpu == "x64") { | 344 if (host_cpu == "x86" || host_cpu == "x64") { |
349 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" | 345 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" |
350 } else { | 346 } else { |
351 host_toolchain = "//build/toolchain/linux:$host_cpu" | 347 host_toolchain = "//build/toolchain/linux:$host_cpu" |
352 } | 348 } |
353 } else if (host_os == "mac") { | 349 } else if (host_os == "mac") { |
354 host_toolchain = "//build/toolchain/mac:clang_$host_cpu" | 350 host_toolchain = "//build/toolchain/mac:clang_$host_cpu" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 sources = invoker.sources | 462 sources = invoker.sources |
467 } | 463 } |
468 if (defined(invoker.testonly)) { | 464 if (defined(invoker.testonly)) { |
469 testonly = invoker.testonly | 465 testonly = invoker.testonly |
470 } | 466 } |
471 if (defined(invoker.visibility)) { | 467 if (defined(invoker.visibility)) { |
472 visibility = invoker.visibility | 468 visibility = invoker.visibility |
473 } | 469 } |
474 } | 470 } |
475 } | 471 } |
OLD | NEW |