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) |
} |