Bug 1175934 part 1: Allow build target configuration from config file. r=jlund
authorWander Lairson Costa <wcosta@mozilla.com>
Thu, 02 Jul 2015 18:15:55 -0300 (2015-07-02)
changeset 4224 1d9d27ca8b316dd844fe400c8bc374ae51271703
parent 4223 a6f2fe4067eab29cfd362553aa9d748af684ffaa
child 4225 0e613ece6d9324e5618240c98fbe836cca2cf437
push id3364
push userwcosta@mozilla.com
push dateSun, 05 Jul 2015 21:45:34 +0000 (2015-07-05)
reviewersjlund
bugs1175934
Bug 1175934 part 1: Allow build target configuration from config file. r=jlund For now, we are going to provide builds with and without blobs. Instead of going into the pain of creating new devices targets just to add blobfree in config.json, we allow configuration of build targets in the mozharness config file.
scripts/b2g_build.py
--- a/scripts/b2g_build.py
+++ b/scripts/b2g_build.py
@@ -535,16 +535,17 @@ class B2GBuild(LocalesMixin, PurgeMixin,
                 cmd.append('-j{0}'.format(multiprocessing.cpu_count()))
             cmd.append(target)
         return cmd
 
     def build(self):
         dirs = self.query_abs_dirs()
         gecko_config = self.load_gecko_config()
         build_targets = gecko_config.get('build_targets', [])
+        build_targets.extend(self.config.get("build_targets", []))
         if not build_targets:
             cmds = [self.generate_build_command()]
         else:
             cmds = [self.generate_build_command(t) for t in build_targets]
         env = self.query_build_env()
         if self.config.get('gaia_languages_file'):
             env['LOCALE_BASEDIR'] = dirs['gaia_l10n_base_dir']
             env['LOCALES_FILE'] = os.path.join(dirs['abs_work_dir'], 'gaia', self.config['gaia_languages_file'])