Bug 1526201 - Fix objdir used by --enable-application=mobile/android builds. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 12 Feb 2019 22:36:57 +0000
changeset 458815 8a7955cc1149
parent 458814 5cbc3f79a126
child 458816 469060293380
push id35548
push useropoprus@mozilla.com
push dateWed, 13 Feb 2019 09:48:26 +0000
treeherdermozilla-central@93e37c529818 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1526201
milestone67.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 1526201 - Fix objdir used by --enable-application=mobile/android builds. r=chmanchester Differential Revision: https://phabricator.services.mozilla.com/D19474
build/moz.configure/init.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -813,20 +813,28 @@ def real_host(value, shell):
         host = config_sub(shell, value[0])
 
     return split_triplet(host)
 
 
 host = help_host_target | real_host
 
 
-@depends('--target', real_host, shell, '--enable-project')
+@depends('--target', real_host, shell, '--enable-project', '--enable-application')
 @checking('for target system type', lambda t: t.alias)
-def real_target(value, host, shell, project):
-    if project:
+def real_target(value, host, shell, project, application):
+    # Because --enable-project is implied by --enable-application, and
+    # implied options are not currently handled during --help, which is
+    # used get the build target in mozbuild.base, we manually check
+    # whether --enable-application was given, and fall back to
+    # --enable-project if not. Both can't be given contradictory values
+    # under normal circumstances, so it's fine.
+    if application:
+        project = application[0]
+    elif project:
         project = project[0]
     if not value:
         if project == 'mobile/android':
             return split_triplet('arm-unknown-linux-androideabi')
         return host
     # If --target was only given a cpu arch, expand it with the
     # non-cpu part of the host. For mobile/android, expand it with
     # unknown-linux-android.