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 # BUILD FLAGS | 6 # BUILD FLAGS |
7 # ============================================================================= | 7 # ============================================================================= |
8 # | 8 # |
9 # This block lists input arguments to the build, along with their default | 9 # This block lists input arguments to the build, along with their default |
10 # values. GN requires listing them explicitly so it can validate input and have | 10 # values. GN requires listing them explicitly so it can validate input and have |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 # ============================================================================== | 376 # ============================================================================== |
377 # TOOLCHAIN SETUP | 377 # TOOLCHAIN SETUP |
378 # ============================================================================== | 378 # ============================================================================== |
379 # | 379 # |
380 # Here we set the default toolchain, as well as the variable host_toolchain | 380 # Here we set the default toolchain, as well as the variable host_toolchain |
381 # which will identify the toolchain corresponding to the local system when | 381 # which will identify the toolchain corresponding to the local system when |
382 # doing cross-compiles. When not cross-compiling, this will be the same as the | 382 # doing cross-compiles. When not cross-compiling, this will be the same as the |
383 # default toolchain. | 383 # default toolchain. |
384 | 384 |
385 if (is_win) { | 385 if (is_win) { |
386 if (cpu_arch == "x64") { | 386 if (build_cpu_arch == "x64") { |
387 host_toolchain = "//build/toolchain/win:64" | 387 host_toolchain = "//build/toolchain/win:64" |
388 } else if (cpu_arch == "x86") { | 388 } else if (build_cpu_arch == "x86") { |
389 host_toolchain = "//build/toolchain/win:32" | 389 host_toolchain = "//build/toolchain/win:32" |
390 } | 390 } |
391 set_default_toolchain(host_toolchain) | 391 |
| 392 if (cpu_arch == "x64") { |
| 393 set_default_toolchain("//build/toolchain/win:64") |
| 394 } else if (cpu_arch == "x86") { |
| 395 set_default_toolchain("//build/toolchain/win:32") |
| 396 } |
392 } else if (is_linux) { | 397 } else if (is_linux) { |
393 host_toolchain = "//build/toolchain/linux:host" | 398 if (build_cpu_arch == "arm") { |
394 if (cpu_arch == "arm" && build_cpu_arch != "arm") { | 399 host_toolchain = "//build/toolchain/linux:arm" |
395 # Special toolchain for ARM cross-compiling. | 400 } else if (build_cpu_arch == "x86") { |
396 set_default_toolchain("//build/toolchain/linux:arm-cross-compile") | 401 host_toolchain = "//build/toolchain/linux:32" |
397 } else { | 402 } else if (build_cpu_arch == "x64") { |
398 # Use whatever GCC is on the current platform. | 403 host_toolchain = "//build/toolchain/linux:64" |
399 set_default_toolchain(host_toolchain) | 404 } |
| 405 |
| 406 if (build_cpu_arch == "arm") { |
| 407 set_default_toolchain("//build/toolchain/linux:arm") |
| 408 } else if (build_cpu_arch == "x86") { |
| 409 set_default_toolchain("//build/toolchain/linux:32") |
| 410 } else if (build_cpu_arch == "x64") { |
| 411 set_default_toolchain("//build/toolchain/linux:64") |
400 } | 412 } |
401 } else if (is_mac) { | 413 } else if (is_mac) { |
402 host_toolchain = "//build/toolchain/mac:clang" | 414 host_toolchain = "//build/toolchain/mac:clang" |
403 set_default_toolchain(host_toolchain) | 415 set_default_toolchain(host_toolchain) |
404 } | 416 } |
OLD | NEW |