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

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

Issue 1128903005: Enable cross compile to android from mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months 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
« no previous file with comments | « no previous file | build/config/android/config.gni » ('j') | build/toolchain/mac/BUILD.gn » ('J')
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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 if (is_win) { 481 if (is_win) {
482 # On windows we use the same toolchain for host and target by default. 482 # On windows we use the same toolchain for host and target by default.
483 # TODO(dpranke): rename the toolchains to x64 and x86 to match current_cpu. 483 # TODO(dpranke): rename the toolchains to x64 and x86 to match current_cpu.
484 if (current_cpu == "x64") { 484 if (current_cpu == "x64") {
485 host_toolchain = "//build/toolchain/win:64" 485 host_toolchain = "//build/toolchain/win:64"
486 } else if (current_cpu == "x86") { 486 } else if (current_cpu == "x86") {
487 host_toolchain = "//build/toolchain/win:32" 487 host_toolchain = "//build/toolchain/win:32"
488 } 488 }
489 set_default_toolchain("$host_toolchain") 489 set_default_toolchain("$host_toolchain")
490 } else if (is_android) { 490 } else if (is_android) {
491 # Use clang for the x86/64 Linux host builds. 491 if (host_os == "linux") {
492 if (host_cpu == "x86" || host_cpu == "x64") { 492 # Use clang for the x86/64 Linux host builds.
493 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" 493 if (host_cpu == "x86" || host_cpu == "x64") {
494 host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
495 } else {
496 host_toolchain = "//build/toolchain/linux:$host_cpu"
497 }
498 } else if (host_os == "mac") {
499 host_toolchain = "//build/toolchain/mac:clang_$host_cpu"
494 } else { 500 } else {
495 host_toolchain = "//build/toolchain/linux:$host_cpu" 501 assert(false, "Unknown host for android cross compile")
496 } 502 }
497 set_default_toolchain("//build/toolchain/android:$current_cpu") 503 set_default_toolchain("//build/toolchain/android:$current_cpu")
498 } else if (is_linux) { 504 } else if (is_linux) {
499 if (is_clang) { 505 if (is_clang) {
500 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" 506 host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
501 set_default_toolchain("//build/toolchain/linux:clang_$current_cpu") 507 set_default_toolchain("//build/toolchain/linux:clang_$current_cpu")
502 } else { 508 } else {
503 host_toolchain = "//build/toolchain/linux:$host_cpu" 509 host_toolchain = "//build/toolchain/linux:$host_cpu"
504 set_default_toolchain("//build/toolchain/linux:$current_cpu") 510 set_default_toolchain("//build/toolchain/linux:$current_cpu")
505 } 511 }
506 if (is_chromeos && cros_use_custom_toolchain) { 512 if (is_chromeos && cros_use_custom_toolchain) {
507 set_default_toolchain("//build/toolchain/cros:target") 513 set_default_toolchain("//build/toolchain/cros:target")
508 } 514 }
509 } else if (is_mac) { 515 } else if (is_mac) {
510 host_toolchain = "//build/toolchain/mac:clang" 516 host_toolchain = "//build/toolchain/mac:clang_x64"
511 set_default_toolchain(host_toolchain) 517 set_default_toolchain(host_toolchain)
512 } else if (is_ios) { 518 } else if (is_ios) {
513 host_toolchain = "//build/toolchain/mac:host_clang" 519 host_toolchain = "//build/toolchain/mac:clang_x64"
514 set_default_toolchain("//build/toolchain/mac:clang") 520 set_default_toolchain("//build/toolchain/mac:clang_$current_cpu")
515 } else if (is_nacl) { 521 } else if (is_nacl) {
516 # TODO(GYP): This will need to change when we get NaCl working 522 # TODO(GYP): This will need to change when we get NaCl working
517 # on multiple platforms, but this whole block of code (how we define 523 # on multiple platforms, but this whole block of code (how we define
518 # host_toolchain) needs to be reworked regardless to key off of host_os 524 # host_toolchain) needs to be reworked regardless to key off of host_os
519 # and host_cpu rather than the is_* variables. 525 # and host_cpu rather than the is_* variables.
520 host_toolchain = "//build/toolchain/linux:clang_x64" 526 host_toolchain = "//build/toolchain/linux:clang_x64"
521 } 527 }
522 528
523 # ============================================================================== 529 # ==============================================================================
524 # COMPONENT SETUP 530 # COMPONENT SETUP
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 } 726 }
721 if (defined(invoker.testonly)) { 727 if (defined(invoker.testonly)) {
722 testonly = invoker.testonly 728 testonly = invoker.testonly
723 } 729 }
724 if (defined(invoker.visibility)) { 730 if (defined(invoker.visibility)) {
725 visibility = invoker.visibility 731 visibility = invoker.visibility
726 } 732 }
727 } 733 }
728 } 734 }
729 } 735 }
OLDNEW
« no previous file with comments | « no previous file | build/config/android/config.gni » ('j') | build/toolchain/mac/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698