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.
--- 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'])