Bug 1520402 - Require the android NDK when targetting Android, not when building Fennec. r=nalexander
☠☠ backed out by e96f2ef97459 ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 16 Jan 2019 23:26:51 +0000
changeset 514170 bc6c2b781953
parent 514169 ba1ee17a47e9
child 514171 e822bc175cee
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1520402
milestone66.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 1520402 - Require the android NDK when targetting Android, not when building Fennec. r=nalexander Differential Revision: https://phabricator.services.mozilla.com/D16671
build/moz.configure/android-ndk.configure
build/moz.configure/toolchain.configure
--- a/build/moz.configure/android-ndk.configure
+++ b/build/moz.configure/android-ndk.configure
@@ -46,25 +46,24 @@ def android_version(value, min_version, 
             min_version, value[0])
 
     return version
 
 
 add_old_configure_assignment('android_version', android_version)
 
 
-@depends('--with-android-ndk', build_project, '--help')
-def ndk(value, build_project, help):
+@depends('--with-android-ndk', '--help')
+def ndk(value, help):
     if help:
         return
-    if build_project == 'mobile/android' and not value:
+    if not value:
         die('You must specify --with-android-ndk=/path/to/ndk when '
-            'building mobile/android')
-    if value:
-        return value[0]
+            'building for Android')
+    return value[0]
 
 
 set_config('ANDROID_NDK', ndk)
 add_old_configure_assignment('android_ndk', ndk)
 
 
 @depends(ndk)
 @checking('for android ndk version')
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -159,19 +159,19 @@ set_config('HAVE_NASM', have_nasm)
 set_config('HAVE_YASM', have_yasm)
 # Until the YASM variable is not necessary in old-configure.
 add_old_configure_assignment('YASM', have_yasm)
 
 # Android NDK
 # ==============================================================
 
 
-@depends('--disable-compile-environment', build_project)
-def compiling_android(compile_env, build_project):
-    return compile_env and build_project in ('mobile/android', 'js')
+@depends('--disable-compile-environment', target)
+def compiling_android(compile_env, target):
+    return compile_env and target.os == 'Android'
 
 
 include('android-ndk.configure', when=compiling_android)
 
 with only_when(target_is_osx):
     # MacOS deployment target version
     # ==============================================================
     # This needs to happen before any compilation test is done.