Backed out changeset 1d2c46c8c7c7 (bug 1244446)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 06 Jun 2016 14:28:44 +0200
changeset 340714 7ab897482e06f84bc4db00b622e9daad40d0e6c5
parent 340713 b6b815881f396d082605a425d819714a927ae22a
child 340715 ed9a7b145c3c3b877d46e86ab7d4d1d4be661dff
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1244446
milestone49.0a1
backs out1d2c46c8c7c764daf8638663524033dfe330cf0a
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
Backed out changeset 1d2c46c8c7c7 (bug 1244446)
client.mk
python/mozbuild/mozbuild/mach_commands.py
--- a/client.mk
+++ b/client.mk
@@ -427,25 +427,16 @@ ifdef MOZ_POSTFLIGHT
 	done
 endif
 
 endif # MOZ_CURRENT_PROJECT
 
 ####################################
 # Postflight, after building all projects
 
-ifdef MOZ_AUTOMATION
-ifndef MOZ_CURRENT_PROJECT
-realbuild::
-# Only run the automation/build target for the first project.
-# (i.e. first platform of universal builds)
-	$(MAKE) -f $(TOPSRCDIR)/client.mk automation/build $(addprefix MOZ_CURRENT_PROJECT=,$(firstword $(MOZ_BUILD_PROJECTS)))
-endif
-endif
-
 realbuild postflight_all::
 ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_POSTFLIGHT_ALL),,1))
 # Don't run postflight_all for individual projects in multi-project builds
 # (when MOZ_CURRENT_PROJECT is set.)
 ifndef MOZ_BUILD_PROJECTS
 # Building a single project, OBJDIR is usable.
 	set -e; \
 	for mkfile in $(MOZ_POSTFLIGHT_ALL); do \
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -429,16 +429,37 @@ class Build(MachCommandBase):
                     self.log(logging.DEBUG, 'artifact',
                              {}, "Not running |mach artifact install| -- it will be run by client.mk.")
 
                 status = self._run_make(srcdir=True, filename='client.mk',
                     line_handler=output.on_line, log=False, print_directory=False,
                     allow_parallel=False, ensure_exit_code=False, num_jobs=jobs,
                     silent=not verbose)
 
+                make_extra = self.mozconfig['make_extra'] or []
+                make_extra = dict(m.split('=', 1) for m in make_extra)
+
+                # For universal builds, we need to run the automation steps in
+                # the first architecture from MOZ_BUILD_PROJECTS
+                projects = make_extra.get('MOZ_BUILD_PROJECTS')
+                append_env = None
+                if projects:
+                    project = projects.split()[0]
+                    append_env = {b'MOZ_CURRENT_PROJECT': project.encode('utf-8')}
+                    subdir = os.path.join(self.topobjdir, project)
+                else:
+                    subdir = self.topobjdir
+                moz_automation = os.getenv('MOZ_AUTOMATION') or make_extra.get('export MOZ_AUTOMATION', None)
+                if moz_automation and status == 0:
+                    status = self._run_make(target='automation/build', directory=subdir,
+                        line_handler=output.on_line, log=False, print_directory=False,
+                        ensure_exit_code=False, num_jobs=jobs, silent=not verbose,
+                        append_env=append_env
+                    )
+
                 self.log(logging.WARNING, 'warning_summary',
                     {'count': len(monitor.warnings_database)},
                     '{count} compiler warnings present.')
 
             monitor.finish(record_usage=status==0)
 
         high_finder, finder_percent = monitor.have_high_finder_usage()
         if high_finder: