Bug 1253809 - Add Android/aarch64 build config. r?glandium draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 07 Oct 2016 19:46:57 +0900
changeset 422995 dc9b089b4774205ddc680d3d03fdeeb95166b4fd
parent 422903 7a7ba250bb2f5a7cc7acf4b97145425c5292e894
child 533356 1e80b16d924c98025305d907bbe616303963d2ab
push id31794
push userm_kato@ga2.so-net.ne.jp
push dateSun, 09 Oct 2016 15:08:00 +0000
reviewersglandium
bugs1253809
milestone52.0a1
Bug 1253809 - Add Android/aarch64 build config. r?glandium MozReview-Commit-ID: 2WN6GOWb572
build/autoconf/android.m4
build/moz.configure/android-ndk.configure
--- 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)