Bug 1570411 - Add --without-fennec to make `mach package` not produce Fennec APK. r=chmanchester
authorNick Alexander <nalexander@mozilla.com>
Wed, 14 Aug 2019 20:40:00 +0000
changeset 488031 c02aa182735b12c584d7e9eff3a366d6e28c73e3
parent 488030 4c1bdf45201ae5fce0b87225c46a6ae5f7c6034a
child 488032 ee3e55708782cc1d6d3965a01fbbb3f704f3fc18
push id36434
push usercbrindusan@mozilla.com
push dateThu, 15 Aug 2019 09:44:30 +0000
treeherdermozilla-central@144fbfb409b7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1570411
milestone70.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 1570411 - Add --without-fennec to make `mach package` not produce Fennec APK. r=chmanchester When working on GeckoView, there's no need to produce a Fennec APK. This commit avoids doing that work at `mach package` time. There are many other things we'd like to stop doing as we remove Fennec from the tree, so we add a general flag to guard such things. Depends on D41447 Differential Revision: https://phabricator.services.mozilla.com/D41448
mobile/android/moz.configure
toolkit/mozapps/installer/upload-files.mk
--- a/mobile/android/moz.configure
+++ b/mobile/android/moz.configure
@@ -121,16 +121,25 @@ set_define('FENNEC_NIGHTLY', depends_if(
 def fennec_nightly(nightly):
     return bool(nightly)
 
 imply_option('MOZ_NORMANDY', False)
 imply_option('MOZ_SERVICES_HEALTHREPORT', True)
 imply_option('MOZ_ANDROID_HISTORY', True)
 imply_option('--enable-small-chunk-size', True)
 
+option('--without-fennec',
+       help='Build only GeckoView, do not build and package Fennec (Firefox for Android)')
+
+@depends('--with-fennec')
+def with_fennec(value):
+    return bool(value)
+
+set_config('MOZ_ANDROID_WITH_FENNEC', depends_if(with_fennec)(lambda _: True))
+
 @depends(target)
 def check_target(target):
     if target.os != 'Android':
         log.error('You must specify --target=arm-linux-androideabi (or some '
                   'other valid Android target) when building mobile/android.')
         die('See https://developer.mozilla.org/docs/Mozilla/Developer_guide/'
             'Build_Instructions/Simple_Firefox_for_Android_build '
             'for more information about the necessary options.')
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -220,17 +220,22 @@ ifeq ($(MOZ_PKG_FORMAT),RPM)
   INNER_MAKE_PACKAGE = $(RPM_CMD)
   #Avoiding rpm repacks, going to try creating/uploading xpi in rpm files instead
   INNER_UNMAKE_PACKAGE = $(error Try using rpm2cpio and cpio)
 
 endif #Create an RPM file
 
 
 ifeq ($(MOZ_PKG_FORMAT),APK)
+ifdef MOZ_ANDROID_WITH_FENNEC
 include $(MOZILLA_DIR)/toolkit/mozapps/installer/upload-files-$(MOZ_PKG_FORMAT).mk
+else
+INNER_MAKE_PACKAGE = true
+INNER_UNMAKE_PACKAGE = true
+endif # MOZ_ANDROID_WITH_FENNEC
 endif
 
 ifeq ($(MOZ_PKG_FORMAT),DMG)
   PKG_SUFFIX	= .dmg
 
   _ABS_MOZSRCDIR = $(shell cd $(MOZILLA_DIR) && pwd)
   PKG_DMG_SOURCE = $(MOZ_PKG_DIR)
   INNER_MAKE_PACKAGE = \