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

Unified Diff: build/config/android/config.gni

Issue 864173006: Add GN build support for Android 64-bit platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove mojo string in log Created 5 years, 10 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/sysroot.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/config.gni
diff --git a/build/config/android/config.gni b/build/config/android/config.gni
index 60934c2e0b54a5300681e87663e1b16b43d00ca6..6cb3a6ad4386352f2416bf2ee9d7add6f05aac8d 100644
--- a/build/config/android/config.gni
+++ b/build/config/android/config.gni
@@ -93,6 +93,13 @@ if (is_android) {
"platforms/android-${_android_api_level}/arch-arm"
mips_android_sysroot_subdir =
"platforms/android-${_android_api_level}/arch-mips"
+ _android64_api_level = 21
+ x86_64_android_sysroot_subdir =
+ "platforms/android-${_android64_api_level}/arch-x86_64"
+ arm64_android_sysroot_subdir =
+ "platforms/android-${_android64_api_level}/arch-arm64"
+ mips64_android_sysroot_subdir =
+ "platforms/android-${_android64_api_level}/arch-mips64"
# Toolchain root directory for each build. The actual binaries are inside
# a "bin" directory inside of these.
@@ -100,6 +107,9 @@ if (is_android) {
x86_android_toolchain_root = "$android_ndk_root/toolchains/x86-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androideabi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-android-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
+ x86_64_android_toolchain_root = "$android_ndk_root/toolchains/x86_64-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
+ arm64_android_toolchain_root = "$android_ndk_root/toolchains/aarch64-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
+ mips64_android_toolchain_root = "$android_ndk_root/toolchains/mips64el-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
# Location of libgcc. This is only needed for the current GN toolchain, so we
# only need to define the current one, rather than one for every platform
@@ -119,6 +129,21 @@ if (is_android) {
_binary_prefix = "mipsel-linux-android"
android_toolchain_root = "$mips_android_toolchain_root"
android_libgcc_file = "$android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolchain_version}/libgcc.a"
+ } else if (cpu_arch == "x64") {
+ android_prebuilt_arch = "android-x86_64"
+ _binary_prefix = "x86_64-linux-android"
+ android_toolchain_root = "$x86_64_android_toolchain_root"
+ android_libgcc_file = "$android_toolchain_root/lib/gcc/x86_64-linux-android/${_android_toolchain_version}/libgcc.a"
+ } else if (cpu_arch == "arm64") {
+ android_prebuilt_arch = "android-arm64"
+ _binary_prefix = "aarch64-linux-android"
+ android_toolchain_root = "$arm64_android_toolchain_root"
+ android_libgcc_file = "$android_toolchain_root/lib/gcc/aarch64-linux-android/${_android_toolchain_version}/libgcc.a"
+ } else if (cpu_arch == "mips64el") {
+ android_prebuilt_arch = "android-mips64"
+ _binary_prefix = "mips64el-linux-android"
+ android_toolchain_root = "$mips64_android_toolchain_root"
+ android_libgcc_file = "$android_toolchain_root/lib/gcc/mips64el-linux-android/${_android_toolchain_version}/libgcc.a"
} else {
assert(false, "Need android libgcc support for your target arch.")
}
@@ -150,6 +175,12 @@ if (is_android) {
}
} else if (cpu_arch == "mipsel") {
android_app_abi = "mips"
+ } else if (cpu_arch == "x64") {
+ android_app_abi = "x86_64"
+ } else if (cpu_arch == "arm64") {
+ android_app_abi = "arm64-v8a"
+ } else if (cpu_arch == "mips64el") {
+ android_app_abi = "mips64"
} else {
assert(false, "Unknown Android ABI: " + cpu_arch)
}
« no previous file with comments | « no previous file | build/config/sysroot.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698