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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/android/config.gni » ('j') | build/toolchain/mac/BUILD.gn » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILDCONFIG.gn
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 2274c0e98c3266160a8acce3491f5fe269ec45be..ee32088dfcdee63f409cff05760d4a8261d92680 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -488,11 +488,17 @@ if (is_win) {
}
set_default_toolchain("$host_toolchain")
} else if (is_android) {
- # Use clang for the x86/64 Linux host builds.
- if (host_cpu == "x86" || host_cpu == "x64") {
- host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
+ if (host_os == "linux") {
+ # Use clang for the x86/64 Linux host builds.
+ if (host_cpu == "x86" || host_cpu == "x64") {
+ host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
+ } else {
+ host_toolchain = "//build/toolchain/linux:$host_cpu"
+ }
+ } else if (host_os == "mac") {
+ host_toolchain = "//build/toolchain/mac:clang_$host_cpu"
} else {
- host_toolchain = "//build/toolchain/linux:$host_cpu"
+ assert(false, "Unknown host for android cross compile")
}
set_default_toolchain("//build/toolchain/android:$current_cpu")
} else if (is_linux) {
@@ -507,11 +513,11 @@ if (is_win) {
set_default_toolchain("//build/toolchain/cros:target")
}
} else if (is_mac) {
- host_toolchain = "//build/toolchain/mac:clang"
+ host_toolchain = "//build/toolchain/mac:clang_x64"
set_default_toolchain(host_toolchain)
} else if (is_ios) {
- host_toolchain = "//build/toolchain/mac:host_clang"
- set_default_toolchain("//build/toolchain/mac:clang")
+ host_toolchain = "//build/toolchain/mac:clang_x64"
+ set_default_toolchain("//build/toolchain/mac:clang_$current_cpu")
} else if (is_nacl) {
# TODO(GYP): This will need to change when we get NaCl working
# on multiple platforms, but this whole block of code (how we define
« 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