Bug 1350822 - Remove --with-android-gnu-compiler-version. r=glandium
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 20 Sep 2017 20:34:18 +0900
changeset 431699 fc5b1c09a348358cbb25b0e5ed82de73b86a0aeb
parent 431698 2d942fb27e398ba373cab9bccf7e5bc867615ec0
child 431700 81c637ca25e6be73d98b1d864f2ffe9860710e5a
push id7785
push userryanvm@gmail.com
push dateThu, 21 Sep 2017 13:39:55 +0000
treeherdermozilla-beta@06d4034a8a03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1350822
milestone57.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 1350822 - Remove --with-android-gnu-compiler-version. r=glandium gcc 4.9 is the last version in Android NDK and our minimum requirement of gcc is 4.9+. --with-android-gnu-compiler-version is unnecessary option because gcc version of Android is always 4.9. MozReview-Commit-ID: 1sutqlvbQU5
build/moz.configure/android-ndk.configure
mobile/android/config/mozconfigs/common
--- a/build/moz.configure/android-ndk.configure
+++ b/build/moz.configure/android-ndk.configure
@@ -6,19 +6,16 @@
 
 
 js_option('--with-android-ndk', nargs=1,
           help='location where the Android NDK can be found')
 
 js_option('--with-android-toolchain', nargs=1,
           help='location of the Android toolchain')
 
-js_option('--with-android-gnu-compiler-version', nargs=1,
-          help='GNU compiler version to use')
-
 @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'
 
 js_option('--with-android-version',
@@ -136,55 +133,50 @@ add_old_configure_assignment('android_pl
 
 @depends(android_platform)
 def extra_toolchain_flags(platform_dir):
     if not platform_dir:
         return []
     return ['-idirafter',
             os.path.join(platform_dir, 'usr', 'include')]
 
-@depends(target, host, ndk, '--with-android-toolchain',
-         '--with-android-gnu-compiler-version')
+@depends(target, host, ndk, '--with-android-toolchain')
 @checking('for the Android toolchain directory', lambda x: x or 'not found')
 @imports(_from='os.path', _import='isdir')
 @imports(_from='mozbuild.shellutil', _import='quote')
-def android_toolchain(target, host, ndk, toolchain, gnu_compiler_version):
+def android_toolchain(target, host, ndk, toolchain):
     if not ndk:
         return
     if toolchain:
         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'
+        toolchain_format = '%s/toolchains/%s-4.9/prebuilt/%s-%s'
 
-        for version in gnu_compiler_version or ['4.9', '4.8', '4.7']:
+        toolchain = toolchain_format % (ndk, target_base,
+                                        host.kernel.lower(), host.cpu)
+        log.debug('Trying %s' % quote(toolchain))
+        if not isdir(toolchain) and host.cpu == 'x86_64':
             toolchain = toolchain_format % (ndk, target_base, version,
-                                            host.kernel.lower(), host.cpu)
+                                            host.kernel.lower(), 'x86')
             log.debug('Trying %s' % quote(toolchain))
-            if not isdir(toolchain) and host.cpu == 'x86_64':
-                toolchain = toolchain_format % (ndk, target_base, version,
-                                                host.kernel.lower(), 'x86')
-                log.debug('Trying %s' % quote(toolchain))
-            if isdir(toolchain):
-                return toolchain
-        else:
-            if gnu_compiler_version:
-                die('Your --with-android-gnu-compiler-version may be wrong')
-            die('You have to specify --with-android-toolchain='
-                '/path/to/ndk/toolchain.')
+        if isdir(toolchain):
+            return toolchain
+        die('You have to specify --with-android-toolchain='
+            '/path/to/ndk/toolchain.')
 
 set_config('ANDROID_TOOLCHAIN', android_toolchain)
 
 @depends(target, android_toolchain)
 def android_toolchain_prefix(target, toolchain):
     if toolchain:
         if target.cpu == 'x86':
             # Ideally, the --target should just have the right x86 variant
--- a/mobile/android/config/mozconfigs/common
+++ b/mobile/android/config/mozconfigs/common
@@ -39,17 +39,16 @@ ANDROID_NDK_VERSION="r10e"
 ANDROID_NDK_VERSION_32BIT="r8c"
 
 # Build Fennec
 ac_add_options --enable-application=mobile/android
 ac_add_options --with-android-sdk="$topsrcdir/android-sdk-linux"
 
 if [ -z "$NO_NDK" ]; then
     ac_add_options --with-android-ndk="$topsrcdir/android-ndk"
-    ac_add_options --with-android-gnu-compiler-version=4.9
 fi
 
 ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
 
 ac_add_options --with-google-api-keyfile=/builds/gapi.data
 ac_add_options --with-mozilla-api-keyfile=/builds/mozilla-fennec-geoloc-api.key
 
 # MOZ_INSTALL_TRACKING does not guarantee MOZ_UPDATE_CHANNEL will be set so we