Bug 1221200 - Offer Fennec artifact builds in |mach bootstrap|. r=nalexander
authorSambuddha Basu <sambuddhabasu1@gmail.com>
Sat, 27 Feb 2016 17:01:31 +0530
changeset 287030 7280ed7ecd34d1507624a326bc7e84c5ef451c16
parent 287029 b8e594c21349c24f07bf6a63764f3c1bb9734e46
child 287031 8d604d4a13f3626ade10a9b8a96f8ac5bf7e4ffa
push id18046
push usernalexander@mozilla.com
push dateMon, 07 Mar 2016 21:08:14 +0000
treeherderfx-team@8d604d4a13f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1221200
milestone47.0a1
Bug 1221200 - Offer Fennec artifact builds in |mach bootstrap|. r=nalexander MozReview-Commit-ID: D2dw6qfPa5k
python/mozboot/mozboot/android.py
python/mozboot/mozboot/archlinux.py
python/mozboot/mozboot/base.py
python/mozboot/mozboot/bootstrap.py
python/mozboot/mozboot/centosfedora.py
python/mozboot/mozboot/debian.py
python/mozboot/mozboot/osx.py
--- a/python/mozboot/mozboot/android.py
+++ b/python/mozboot/mozboot/android.py
@@ -69,16 +69,33 @@ ac_add_options --enable-application=mobi
 ac_add_options --target=arm-linux-androideabi
 
 # With the following Android SDK and NDK:
 ac_add_options --with-android-sdk="%s"
 ac_add_options --with-android-ndk="%s"
 >>>
 '''
 
+MOBILE_ANDROID_ARTIFACT_MODE_MOZCONFIG_TEMPLATE = '''
+Paste the lines between the chevrons (>>> and <<<) into your mozconfig file:
+
+<<<
+# Build Firefox for Android Artifact Mode:
+ac_add_options --enable-application=mobile/android
+ac_add_options --target=arm-linux-androideabi
+ac_add_options --enable-artifact-builds
+
+# With the following Android SDK:
+ac_add_options --with-android-sdk="%s"
+
+# Write build artifacts to:
+mk_add_options MOZ_OBJDIR=./objdir-frontend
+>>>
+'''
+
 
 def check_output(*args, **kwargs):
     """Run subprocess.check_output even if Python doesn't provide it."""
     from base import BaseBootstrapper
     fn = getattr(subprocess, 'check_output', BaseBootstrapper._check_output)
 
     return fn(*args, **kwargs)
 
@@ -172,29 +189,31 @@ def install_mobile_android_sdk_or_ndk(ur
             subprocess.check_call(cmd, stdout=stdout)
 
         print('Unpacking %s... DONE' % abspath)
 
     finally:
         os.chdir(old_path)
 
 
-def ensure_android_sdk_and_ndk(path, sdk_path, sdk_url, ndk_path, ndk_url):
+def ensure_android_sdk_and_ndk(path, sdk_path, sdk_url, ndk_path, ndk_url, artifact_mode):
     '''
     Ensure the Android SDK and NDK are found at the given paths.  If not, fetch
     and unpack the SDK and/or NDK from the given URLs into |path|.
     '''
 
-    # It's not particularyl bad to overwrite the NDK toolchain, but it does take
+    # It's not particularly bad to overwrite the NDK toolchain, but it does take
     # a while to unpack, so let's avoid the disk activity if possible.  The SDK
     # may prompt about licensing, so we do this first.
-    if os.path.isdir(ndk_path):
-        print(ANDROID_NDK_EXISTS % ndk_path)
-    else:
-        install_mobile_android_sdk_or_ndk(ndk_url, path)
+    # Check for Android NDK only if we are not in artifact mode.
+    if not artifact_mode:
+        if os.path.isdir(ndk_path):
+            print(ANDROID_NDK_EXISTS % ndk_path)
+        else:
+            install_mobile_android_sdk_or_ndk(ndk_url, path)
 
     # We don't want to blindly overwrite, since we use the |android| tool to
     # install additional parts of the Android toolchain.  If we overwrite,
     # we lose whatever Android packages the user may have already installed.
     if os.path.isdir(sdk_path):
         print(ANDROID_SDK_EXISTS % sdk_path)
     else:
         install_mobile_android_sdk_or_ndk(sdk_url, path)
@@ -227,18 +246,21 @@ def ensure_android_packages(android_tool
     # Bug 1171232: The |android| tool behaviour has changed; we no longer can
     # see what packages are installed easily.  Don't check until we find a way
     # to actually verify.
     failing = []
     if failing:
         raise Exception(MISSING_ANDROID_PACKAGES % (', '.join(missing), ', '.join(failing)))
 
 
-def suggest_mozconfig(sdk_path=None, ndk_path=None):
-    print(MOBILE_ANDROID_MOZCONFIG_TEMPLATE % (sdk_path, ndk_path))
+def suggest_mozconfig(sdk_path=None, ndk_path=None, artifact_mode=False):
+    if artifact_mode:
+        print(MOBILE_ANDROID_ARTIFACT_MODE_MOZCONFIG_TEMPLATE % (sdk_path))
+    else:
+        print(MOBILE_ANDROID_MOZCONFIG_TEMPLATE % (sdk_path, ndk_path))
 
 
 def android_ndk_url(os_name, ver='r10e'):
     # Produce a URL like 'https://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin'.
     base_url = 'https://dl.google.com/android/ndk/android-ndk'
 
     if sys.maxsize > 2**32:
         arch = 'x86_64'
--- a/python/mozboot/mozboot/archlinux.py
+++ b/python/mozboot/mozboot/archlinux.py
@@ -80,21 +80,27 @@ class ArchlinuxBootstrapper(BaseBootstra
     def install_system_packages(self):
         self.pacman_install(*self.SYSTEM_PACKAGES)
 
     def install_browser_packages(self):
         self.aur_install(*self.BROWSER_AUR_PACKAGES)
         self.pacman_install(*self.BROWSER_PACKAGES)
 
     def install_mobile_android_packages(self):
+        self.ensure_mobile_android_packages()
+
+    def install_mobile_android_artifact_mode_packages(self):
+        self.ensure_mobile_android_packages(artifact_mode=True)
+
+    def ensure_mobile_android_packages(self, artifact_mode=False):
         import android
 
         # Multi-part process:
         # 1. System packages.
-        # 2. Android SDK and NDK.
+        # 2. Android SDK. Android NDK only if we are not in artifact mode.
         # 3. Android packages.
 
         # 1. This is hard to believe, but the Android SDK binaries are 32-bit
         # and that conflicts with 64-bit Arch installations out of the box.  The
         # solution is to add the multilibs repository; unfortunately, this
         # requires manual intervention.
         try:
             self.pacman_install(*self.MOBILE_ANDROID_COMMON_PACKAGES)
@@ -112,24 +118,29 @@ class ArchlinuxBootstrapper(BaseBootstra
         mozbuild_path = os.environ.get('MOZBUILD_STATE_PATH', os.path.expanduser(os.path.join('~', '.mozbuild')))
         self.sdk_path = os.environ.get('ANDROID_SDK_HOME', os.path.join(mozbuild_path, 'android-sdk-linux'))
         self.ndk_path = os.environ.get('ANDROID_NDK_HOME', os.path.join(mozbuild_path, 'android-ndk-r10e'))
         self.sdk_url = 'https://dl.google.com/android/android-sdk_r24.0.1-linux.tgz'
         self.ndk_url = android.android_ndk_url('linux')
 
         android.ensure_android_sdk_and_ndk(path=mozbuild_path,
                                            sdk_path=self.sdk_path, sdk_url=self.sdk_url,
-                                           ndk_path=self.ndk_path, ndk_url=self.ndk_url)
+                                           ndk_path=self.ndk_path, ndk_url=self.ndk_url,
+                                           artifact_mode=artifact_mode)
         android_tool = os.path.join(self.sdk_path, 'tools', 'android')
         android.ensure_android_packages(android_tool=android_tool)
 
-    def suggest_mobile_android_mozconfig(self):
+    def suggest_mobile_android_mozconfig(self, artifact_mode=False):
         import android
         android.suggest_mozconfig(sdk_path=self.sdk_path,
-                                  ndk_path=self.ndk_path)
+                                  ndk_path=self.ndk_path,
+                                  artifact_mode=artifact_mode)
+
+    def suggest_mobile_android_artifact_mode_mozconfig(self):
+        self.suggest_mobile_android_mozconfig(artifact_mode=True)
 
     def _update_package_manager(self):
         self.pacman_update
 
     def upgrade_mercurial(self, current):
         self.pacman_install('mercurial')
 
     def upgrade_python(self, current):
--- a/python/mozboot/mozboot/base.py
+++ b/python/mozboot/mozboot/base.py
@@ -131,16 +131,38 @@ class BaseBootstrapper(object):
         should contain.
 
         Firefox for Android needs an application and an ABI set, and it needs
         paths to the Android SDK and NDK.
         '''
         raise NotImplementedError('%s does not yet implement suggest_mobile_android_mozconfig()' %
                                   __name__)
 
+    def install_mobile_android_artifact_mode_packages(self):
+        '''
+        Install packages required to build Firefox for Android (application
+        'mobile/android', also known as Fennec) in Artifact Mode.
+        '''
+        raise NotImplementedError(
+            'Cannot bootstrap Firefox for Android Artifact Mode: '
+            '%s does not yet implement install_mobile_android_artifact_mode_packages()'
+            % __name__)
+
+    def suggest_mobile_android_artifact_mode_mozconfig(self):
+        '''
+        Print a message to the console detailing what the user's mozconfig
+        should contain.
+
+        Firefox for Android Artifact Mode needs an application and an ABI set,
+        and it needs paths to the Android SDK.
+        '''
+        raise NotImplementedError(
+            '%s does not yet implement suggest_mobile_android_artifact_mode_mozconfig()'
+            % __name__)
+
     def which(self, name):
         """Python implementation of which.
 
         It returns the path of an executable or None if it couldn't be found.
         """
         for path in os.environ['PATH'].split(os.pathsep):
             test = os.path.join(path, name)
             if os.path.exists(test) and os.access(test, os.X_OK):
--- a/python/mozboot/mozboot/bootstrap.py
+++ b/python/mozboot/mozboot/bootstrap.py
@@ -17,29 +17,42 @@ from mozboot.freebsd import FreeBSDBoots
 from mozboot.gentoo import GentooBootstrapper
 from mozboot.osx import OSXBootstrapper
 from mozboot.openbsd import OpenBSDBootstrapper
 from mozboot.archlinux import ArchlinuxBootstrapper
 
 APPLICATION_CHOICE = '''
 Please choose the version of Firefox you want to build:
 %s
+
+Note: (For Firefox for Android)
+
+Firefox for Android is built on top of the Gecko technology platform. Gecko is Mozilla's web rendering engine, similar to Edge, Blink, and WebKit. Gecko is implemented in C++ and JavaScript. If you want to work on web rendering, this is what you want.
+
+The Firefox for Android Front-End is built using Java, the Android Platform SDK, JavaScript, HTML, and CSS. If you want to work on the look-and-feel of Firefox for Android, this is what you want.
+
+If you don't know what you want, start with just the Firefox for Android Artifact Mode. Your builds will be much shorter than if you build Gecko as well. But don't worry! You can always switch configurations later.
+
+You can learn more about Artifact builds from https://developer.mozilla.org/en-US/docs/Artifact_builds
+
 Your choice:
 '''
 
 APPLICATIONS_LIST=[
     ('Firefox for Desktop', 'browser'),
-    ('Firefox for Android', 'mobile_android')
+    ('Firefox for Android', 'mobile_android'),
+    ('Firefox for Android Artifact Mode', 'mobile_android_artifact_mode')
 ]
 
 # This is a workaround for the fact that we must support python2.6 (which has
 # no OrderedDict)
 APPLICATIONS = dict(
     desktop=APPLICATIONS_LIST[0],
     android=APPLICATIONS_LIST[1],
+    android_artifact_mode=APPLICATIONS_LIST[2],
 )
 
 FINISHED = '''
 Your system should be ready to build %s! If you have not already,
 obtain a copy of the source code by running:
 
     hg clone https://hg.mozilla.org/mozilla-central
 
@@ -114,17 +127,17 @@ class Bootstrapper(object):
         if cls is None:
             raise NotImplementedError('Bootstrap support is not yet available '
                                       'for your OS.')
 
         self.instance = cls(**args)
 
     def bootstrap(self):
         if self.choice is None:
-            # Like ['1. Firefox for Desktop', '2. Firefox for Android'].
+            # Like ['1. Firefox for Desktop', '2. Firefox for Android', '3. Firefox for Android Artifact Mode'].
             labels = ['%s. %s' % (i + 1, name) for (i, (name, _)) in enumerate(APPLICATIONS_LIST)]
             prompt = APPLICATION_CHOICE % '\n'.join(labels)
             prompt_choice = self.instance.prompt_int(prompt=prompt, low=1, high=len(APPLICATIONS))
             name, application = APPLICATIONS_LIST[prompt_choice-1]
         elif self.choice not in APPLICATIONS.keys():
             raise Exception('Please pick a valid application choice: (%s)' % '/'.join(APPLICATIONS.keys()))
         else:
             name, application = APPLICATIONS[self.choice]
--- a/python/mozboot/mozboot/centosfedora.py
+++ b/python/mozboot/mozboot/centosfedora.py
@@ -94,32 +94,43 @@ class CentOSFedoraBootstrapper(BaseBoots
             self.run_as_root(['rpm', '-ivh', yasm])
 
     def install_mobile_android_packages(self):
         if self.distro in ('CentOS', 'CentOS Linux'):
             BaseBootstrapper.install_mobile_android_packages(self)
         elif self.distro == 'Fedora':
             self.install_fedora_mobile_android_packages()
 
-    def install_fedora_mobile_android_packages(self):
+    def install_mobile_android_artifact_mode_packages(self):
+        if self.distro in ('CentOS', 'CentOS Linux'):
+            BaseBootstrapper.install_mobile_android_artifact_mode_packages(self)
+        elif self.distro == 'Fedora':
+            self.install_fedora_mobile_android_packages(artifact_mode=True)
+
+    def install_fedora_mobile_android_packages(self, artifact_mode=False):
         import android
 
         # Install Android specific packages.
         self.dnf_install(*self.mobile_android_packages)
 
         # Fetch Android SDK and NDK.
         mozbuild_path = os.environ.get('MOZBUILD_STATE_PATH', os.path.expanduser(os.path.join('~', '.mozbuild')))
         self.sdk_path = os.environ.get('ANDROID_SDK_HOME', os.path.join(mozbuild_path, 'android-sdk-linux'))
         self.ndk_path = os.environ.get('ANDROID_NDK_HOME', os.path.join(mozbuild_path, 'android-ndk-r10e'))
         self.sdk_url = 'https://dl.google.com/android/android-sdk_r24.0.1-linux.tgz'
         self.ndk_url = android.android_ndk_url('linux')
 
         android.ensure_android_sdk_and_ndk(path=mozbuild_path,
                                            sdk_path=self.sdk_path, sdk_url=self.sdk_url,
-                                           ndk_path=self.ndk_path, ndk_url=self.ndk_url)
+                                           ndk_path=self.ndk_path, ndk_url=self.ndk_url,
+                                           artifact_mode=artifact_mode)
 
-    def suggest_mobile_android_mozconfig(self):
+    def suggest_mobile_android_mozconfig(self, artifact_mode=False):
         import android
         android.suggest_mozconfig(sdk_path=self.sdk_path,
-                                  ndk_path=self.ndk_path)
+                                  ndk_path=self.ndk_path,
+                                  artifact_mode=artifact_mode)
+
+    def suggest_mobile_android_artifact_mode_mozconfig(self):
+        self.suggest_mobile_android_mozconfig(artifact_mode=True)
 
     def upgrade_mercurial(self):
         self.dnf_update('mercurial')
--- a/python/mozboot/mozboot/debian.py
+++ b/python/mozboot/mozboot/debian.py
@@ -96,21 +96,27 @@ class DebianBootstrapper(BaseBootstrappe
 
     def install_system_packages(self):
         self.apt_install(*self.packages)
 
     def install_browser_packages(self):
         self.apt_install(*self.browser_packages)
 
     def install_mobile_android_packages(self):
+        self.ensure_mobile_android_packages()
+
+    def install_mobile_android_artifact_mode_packages(self):
+        self.ensure_mobile_android_packages(artifact_mode=True)
+
+    def ensure_mobile_android_packages(self, artifact_mode=False):
         import android
 
         # Multi-part process:
         # 1. System packages.
-        # 2. Android SDK and NDK.
+        # 2. Android SDK. Android NDK only if we are not in artifact mode.
         # 3. Android packages.
 
         # 1. This is hard to believe, but the Android SDK binaries are 32-bit
         # and that conflicts with 64-bit Debian and Ubuntu installations out of
         # the box.  The solution is to add the i386 architecture.  See
         # "Troubleshooting Ubuntu" at
         # http://developer.android.com/sdk/installing/index.html?pkg=tools.
         self.run_as_root(['dpkg', '--add-architecture', 'i386'])
@@ -124,27 +130,32 @@ class DebianBootstrapper(BaseBootstrappe
         mozbuild_path = os.environ.get('MOZBUILD_STATE_PATH', os.path.expanduser(os.path.join('~', '.mozbuild')))
         self.sdk_path = os.environ.get('ANDROID_SDK_HOME', os.path.join(mozbuild_path, 'android-sdk-linux'))
         self.ndk_path = os.environ.get('ANDROID_NDK_HOME', os.path.join(mozbuild_path, 'android-ndk-r10e'))
         self.sdk_url = 'https://dl.google.com/android/android-sdk_r24.0.1-linux.tgz'
         self.ndk_url = android.android_ndk_url('linux')
 
         android.ensure_android_sdk_and_ndk(path=mozbuild_path,
                                            sdk_path=self.sdk_path, sdk_url=self.sdk_url,
-                                           ndk_path=self.ndk_path, ndk_url=self.ndk_url)
+                                           ndk_path=self.ndk_path, ndk_url=self.ndk_url,
+                                           artifact_mode=artifact_mode)
 
         # 3. We expect the |android| tool to at
         # ~/.mozbuild/android-sdk-linux/tools/android.
         android_tool = os.path.join(self.sdk_path, 'tools', 'android')
         android.ensure_android_packages(android_tool=android_tool)
 
-    def suggest_mobile_android_mozconfig(self):
+    def suggest_mobile_android_mozconfig(self, artifact_mode=False):
         import android
         android.suggest_mozconfig(sdk_path=self.sdk_path,
-                                  ndk_path=self.ndk_path)
+                                  ndk_path=self.ndk_path,
+                                  artifact_mode=artifact_mode)
+
+    def suggest_mobile_android_artifact_mode_mozconfig(self):
+        self.suggest_mobile_android_mozconfig(artifact_mode=True)
 
     def _update_package_manager(self):
         self.apt_update()
 
     def upgrade_mercurial(self, current):
         """Install Mercurial from pip because Debian packages typically lag."""
         if self.no_interactive:
             # Install via Apt in non-interactive mode because it is the more
--- a/python/mozboot/mozboot/osx.py
+++ b/python/mozboot/mozboot/osx.py
@@ -188,19 +188,25 @@ class OSXBootstrapper(BaseBootstrapper):
         getattr(self, 'ensure_%s_system_packages' % self.package_manager)()
 
     def install_browser_packages(self):
         getattr(self, 'ensure_%s_browser_packages' % self.package_manager)()
 
     def install_mobile_android_packages(self):
         getattr(self, 'ensure_%s_mobile_android_packages' % self.package_manager)()
 
+    def install_mobile_android_artifact_mode_packages(self):
+        getattr(self, 'ensure_%s_mobile_android_packages' % self.package_manager)(artifact_mode=True)
+
     def suggest_mobile_android_mozconfig(self):
         getattr(self, 'suggest_%s_mobile_android_mozconfig' % self.package_manager)()
 
+    def suggest_mobile_android_artifact_mode_mozconfig(self):
+        getattr(self, 'suggest_%s_mobile_android_mozconfig' % self.package_manager)(artifact_mode=True)
+
     def ensure_xcode(self):
         if self.os_version < StrictVersion('10.7'):
             if not os.path.exists('/Developer/Applications/Xcode.app'):
                 print(XCODE_REQUIRED_LEGACY)
 
                 subprocess.check_call(['open', XCODE_LEGACY])
                 sys.exit(1)
 
@@ -321,20 +327,20 @@ class OSXBootstrapper(BaseBootstrapper):
 
         installed = self.check_output([self.brew, 'list']).split()
         if self.os_version < StrictVersion('10.7') and b'llvm' not in installed:
             print(PACKAGE_MANAGER_OLD_CLANG % ('Homebrew',))
 
             subprocess.check_call([self.brew, '-v', 'install', 'llvm',
                                    '--with-clang', '--all-targets'])
 
-    def ensure_homebrew_mobile_android_packages(self):
+    def ensure_homebrew_mobile_android_packages(self, artifact_mode=False):
         # Multi-part process:
         # 1. System packages.
-        # 2. Android SDK and NDK.
+        # 2. Android SDK. Android NDK only if we are not in artifact mode.
         # 3. Android packages.
 
         import android
 
         # 1. System packages.
         packages = [
             ('brew-cask', 'caskroom/cask/brew-cask'),  # For installing Java later.
             ('wget', 'wget'),
@@ -358,27 +364,29 @@ class OSXBootstrapper(BaseBootstrapper):
         is_64bits = sys.maxsize > 2**32
         if is_64bits:
             self.ndk_url = android.android_ndk_url('darwin')
         else:
             raise Exception('You need a 64-bit version of Mac OS X to build Firefox for Android.')
 
         android.ensure_android_sdk_and_ndk(path=mozbuild_path,
                                            sdk_path=self.sdk_path, sdk_url=self.sdk_url,
-                                           ndk_path=self.ndk_path, ndk_url=self.ndk_url)
+                                           ndk_path=self.ndk_path, ndk_url=self.ndk_url,
+                                           artifact_mode=artifact_mode)
 
         # 3. We expect the |android| tool to at
         # ~/.mozbuild/android-sdk-macosx/tools/android.
         android_tool = os.path.join(self.sdk_path, 'tools', 'android')
         android.ensure_android_packages(android_tool=android_tool)
 
-    def suggest_homebrew_mobile_android_mozconfig(self):
+    def suggest_homebrew_mobile_android_mozconfig(self, artifact_mode=False):
         import android
         android.suggest_mozconfig(sdk_path=self.sdk_path,
-                                  ndk_path=self.ndk_path)
+                                  ndk_path=self.ndk_path,
+                                  artifact_mode=artifact_mode)
 
     def _ensure_macports_packages(self, packages):
         self.port = self.which('port')
         assert self.port is not None
 
         installed = set(self.check_output([self.port, 'installed']).split())
 
         missing = [package for package in packages if package not in installed]
@@ -405,20 +413,20 @@ class OSXBootstrapper(BaseBootstrapper):
         self._ensure_macports_packages(packages)
 
         installed = set(self.check_output([self.port, 'installed']).split())
         if self.os_version < StrictVersion('10.7') and MACPORTS_CLANG_PACKAGE not in installed:
             print(PACKAGE_MANAGER_OLD_CLANG % ('MacPorts',))
             self.run_as_root([self.port, '-v', 'install', MACPORTS_CLANG_PACKAGE])
             self.run_as_root([self.port, 'select', '--set', 'clang', 'mp-' + MACPORTS_CLANG_PACKAGE])
 
-    def ensure_macports_mobile_android_packages(self):
+    def ensure_macports_mobile_android_packages(self, artifact_mode=False):
         # Multi-part process:
         # 1. System packages.
-        # 2. Android SDK and NDK.
+        # 2. Android SDK. Android NDK only if we are not in artifact mode.
         # 3. Android packages.
 
         import android
 
         # 1. System packages.
         packages = [
             'wget',
         ]
@@ -438,27 +446,29 @@ class OSXBootstrapper(BaseBootstrapper):
         is_64bits = sys.maxsize > 2**32
         if is_64bits:
             self.ndk_url = android.android_ndk_url('darwin')
         else:
             raise Exception('You need a 64-bit version of Mac OS X to build Firefox for Android.')
 
         android.ensure_android_sdk_and_ndk(path=mozbuild_path,
                                            sdk_path=self.sdk_path, sdk_url=self.sdk_url,
-                                           ndk_path=self.ndk_path, ndk_url=self.ndk_url)
+                                           ndk_path=self.ndk_path, ndk_url=self.ndk_url,
+                                           artifact_mode=artifact_mode)
 
         # 3. We expect the |android| tool to at
         # ~/.mozbuild/android-sdk-macosx/tools/android.
         android_tool = os.path.join(self.sdk_path, 'tools', 'android')
         android.ensure_android_packages(android_tool=android_tool)
 
-    def suggest_macports_mobile_android_mozconfig(self):
+    def suggest_macports_mobile_android_mozconfig(self, artifact_mode=False):
         import android
         android.suggest_mozconfig(sdk_path=self.sdk_path,
-                                  ndk_path=self.ndk_path)
+                                  ndk_path=self.ndk_path,
+                                  artifact_mode=artifact_mode)
 
     def ensure_package_manager(self):
         '''
         Search package mgr in sys.path, if none is found, prompt the user to install one.
         If only one is found, use that one. If both are found, prompt the user to choose
         one.
         '''
         installed = []