Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: build/config/BUILDCONFIG.gn

Issue 81153003: GN: Add support for 32- and 64-bit cross-compiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | build/config/compiler/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | build/config/compiler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698