Bug 1520402 - Require the android NDK when targetting Android, not when building Fennec. r=nalexander
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 17 Jan 2019 04:14:50 +0000
changeset 514219 037b359d5bf2aba76dc917af828dfe8bc74bc394
parent 514218 73f2517b40899e519a9dfb3b6dfc8dddac5866f8
child 514220 5035c0df097405358d3233832538679c058766e4
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,23 +46,22 @@ 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)
-def ndk(value, build_project):
-    if build_project == 'mobile/android' and not value:
+@depends('--with-android-ndk')
+def ndk(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.