Bug 1253809 - Add Android/aarch64 build config. r?glandium
MozReview-Commit-ID: 2WN6GOWb572
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -47,16 +47,19 @@ if test "$OS_TARGET" = "Android"; then
ANDROID_CPU_ARCH=armeabi
;;
x86-*)
ANDROID_CPU_ARCH=x86
;;
mips32-*) # When target_cpu is mipsel, CPU_ARCH is mips32
ANDROID_CPU_ARCH=mips
;;
+ aarch64-*)
+ ANDROID_CPU_ARCH=arm64-v8a
+ ;;
esac
AC_SUBST(ANDROID_CPU_ARCH)
fi
])
AC_DEFUN([MOZ_ANDROID_STLPORT],
[
--- a/build/moz.configure/android-ndk.configure
+++ b/build/moz.configure/android-ndk.configure
@@ -55,16 +55,18 @@ add_old_configure_assignment('android_nd
@depends(target, android_version, ndk)
@checking('for android platform directory')
def android_platform(target, android_version, ndk):
if target.os != 'Android':
return
if 'mips' in target.cpu:
target_dir_name = 'mips'
+ elif 'aarch64' == target.cpu:
+ target_dir_name = 'arm64'
else:
target_dir_name = target.cpu
# Not all Android releases have their own platform release. We use
# the next lower platform version in these cases.
if android_version in (11, 10):
platform_version = 9
elif android_version in (20, 22):
@@ -103,16 +105,18 @@ def android_toolchain(target, host, ndk,
return toolchain[0]
else:
if target.cpu == 'arm' and target.endianness == 'little':
target_base = 'arm-linux-androideabi'
elif target.cpu == 'x86':
target_base = 'x86'
elif target.cpu == 'mips32' and target.endianness == 'little':
target_base = 'mipsel-linux-android'
+ elif target.cpu == 'aarch64' and target.endianness == 'little':
+ target_base = 'aarch64-linux-android'
else:
die('Target cpu is not supported.')
toolchain_format = '%s/toolchains/%s-%s/prebuilt/%s-%s'
for version in gnu_compiler_version or ['4.9', '4.8', '4.7']:
toolchain = toolchain_format % (ndk, target_base, version,
host.kernel.lower(), host.cpu)