Bug 1482330 - Upgrade to Android NDK r17b and API level 16 (JB). r=snorp
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 10 Aug 2018 07:21:14 +0900
changeset 486174 2b2bd723ebc8f15f747c4783e8f6d62f3e6d0d0a
parent 486173 32ad5fef292ac00aaf5049c4ceceb5d93f173809
child 486175 a1da4af0f87f0c9abeaa7544cb71cf03eb379d79
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1482330
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1482330 - Upgrade to Android NDK r17b and API level 16 (JB). r=snorp We're currently using NDK r15c, which is rather old, and happens to come with a buggy gold linker. Let's use a more recent NDK, with a fixed linker. Unfortunately, we're currently at NDK API level 9, which the newer NDK doesn't provide for x86 anymore. But that corresponds to Gingerbread (2.3), which we've long stopped supporting. On the SDK side, we already dropped support of versions before Jelly Bean, so we can do the same on the NDK side. That corresponds to API level 16. So let's just use that as a baseline. Another change in the newer NDK is that the target-name changed from i386-linux-android to i686-linux-android, so adjust for that in the android x86 mozconfigs.
build/moz.configure/android-ndk.configure
memory/mozalloc/mozalloc_abort.cpp
mobile/android/config/mozconfigs/android-x86/debug
mobile/android/config/mozconfigs/android-x86/nightly
python/mozboot/mozboot/android.py
--- a/build/moz.configure/android-ndk.configure
+++ b/build/moz.configure/android-ndk.configure
@@ -15,17 +15,17 @@ option('--with-android-googlevr-sdk', na
        help='location of the Android GoogleVR SDK')
 
 
 @depends(target)
 def min_android_version(target):
     if target.cpu in ['aarch64', 'x86_64', 'mips64']:
         # 64-bit support was added in API 21.
         return '21'
-    return '9'
+    return '16'
 
 
 js_option('--with-android-version',
           nargs=1,
           help='android platform version',
           default=min_android_version)
 
 
--- a/memory/mozalloc/mozalloc_abort.cpp
+++ b/memory/mozalloc/mozalloc_abort.cpp
@@ -10,16 +10,17 @@
 #ifdef ANDROID
 # include <android/log.h>
 #endif
 #ifdef MOZ_WIDGET_ANDROID
 # include "APKOpen.h"
 # include "dlfcn.h"
 #endif
 #include <stdio.h>
+#include <string.h>
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Sprintf.h"
 
 void
 mozalloc_abort(const char* const msg)
 {
 #ifndef ANDROID
--- a/mobile/android/config/mozconfigs/android-x86/debug
+++ b/mobile/android/config/mozconfigs/android-x86/debug
@@ -4,17 +4,17 @@
 ac_add_options --enable-debug
 
 # Android
 # Warning: Before increasing the with-android-min-sdk value, please note several places in and out
 # of tree have to be changed. Otherwise, places like Treeherder or archive.mozilla.org will
 # advertise a bad API level. This may confuse people. As an example, please look at bug 1384482.
 # If you think you can't handle the whole set of changes, please reach out to the Release
 # Engineering team.
-ac_add_options --target=i386-linux-android
+ac_add_options --target=i686-linux-android
 ac_add_options --with-android-min-sdk=16
 
 export MOZILLA_OFFICIAL=1
 export MOZ_TELEMETRY_REPORTING=1
 export MOZ_ANDROID_POCKET=1
 
 ac_add_options --with-branding=mobile/android/branding/nightly
 
--- a/mobile/android/config/mozconfigs/android-x86/nightly
+++ b/mobile/android/config/mozconfigs/android-x86/nightly
@@ -1,16 +1,16 @@
 . "$topsrcdir/mobile/android/config/mozconfigs/common"
 
 # Warning: Before increasing the with-android-min-sdk value, please note several places in and out
 # of tree have to be changed. Otherwise, places like Treeherder or archive.mozilla.org will
 # advertise a bad API level. This may confuse people. As an example, please look at bug 1384482.
 # If you think you can't handle the whole set of changes, please reach out to the Release
 # Engineering team.
-ac_add_options --target=i386-linux-android
+ac_add_options --target=i686-linux-android
 ac_add_options --with-android-min-sdk=16
 
 ac_add_options --with-branding=mobile/android/branding/nightly
 
 export MOZILLA_OFFICIAL=1
 export MOZ_TELEMETRY_REPORTING=1
 export MOZ_ANDROID_POCKET=1
 
--- a/python/mozboot/mozboot/android.py
+++ b/python/mozboot/mozboot/android.py
@@ -9,17 +9,17 @@ import errno
 import os
 import stat
 import subprocess
 import sys
 
 # We need the NDK version in multiple different places, and it's inconvenient
 # to pass down the NDK version to all relevant places, so we have this global
 # variable.
-NDK_VERSION = 'r15c'
+NDK_VERSION = 'r17b'
 
 ANDROID_NDK_EXISTS = '''
 Looks like you have the Android NDK installed at:
 %s
 '''
 
 ANDROID_SDK_EXISTS = '''
 Looks like you have the Android SDK installed at: