Bug 1417264 - Move printing of mozconfig lines to Python; r=nalexander
authorGregory Szorc <gps@mozilla.com>
Mon, 13 Nov 2017 15:35:16 -0800
changeset 392236 7e4030a95e89972ecb0d02ed5fa168ff0ea8d300
parent 392235 5ca22a0120c4f3a03886eabce033799f3943ca00
child 392237 308804a30cd321d2066b83151981db93afea33aa
push id32915
push useraciure@mozilla.com
push dateFri, 17 Nov 2017 09:57:26 +0000
treeherdermozilla-central@249a8177ad91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1417264
milestone59.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 1417264 - Move printing of mozconfig lines to Python; r=nalexander We write the file that client.mk is printing from Python. We can also log it from there pretty easily. So do that. MozReview-Commit-ID: 7eeugdOJR5b
client.mk
python/mozbuild/mozbuild/controller/building.py
--- a/client.mk
+++ b/client.mk
@@ -97,23 +97,16 @@ MOZCONFIG_MK_LINES := $(filter export||%
 $(OBJDIR)/.mozconfig.mk: $(TOPSRCDIR)/client.mk $(FOUND_MOZCONFIG)
 	$(if $(MOZCONFIG_MK_LINES),( $(foreach line,$(MOZCONFIG_MK_LINES), echo '$(subst ||, ,$(line))';) )) > $@
 
 # Include that makefile so that it is created. This should not actually change
 # the environment since MOZCONFIG_CONTENT, which MOZCONFIG_OUT_LINES derives
 # from, has already been eval'ed.
 include $(OBJDIR)/.mozconfig.mk
 
-# Print out any options loaded from mozconfig.
-all build clean distclean export libs install realclean::
-ifneq (,$(strip $(MOZCONFIG_OUT_LINES)))
-	$(info Adding client.mk options from $(FOUND_MOZCONFIG):)
-	$(foreach line,$(MOZCONFIG_OUT_LINES),$(info $(NULL) $(NULL) $(NULL) $(NULL) $(subst ||, ,$(line))))
-endif
-
 # In automation, manage an sccache daemon. The starting of the server
 # needs to be in a make file so sccache inherits the jobserver.
 ifdef MOZBUILD_MANAGE_SCCACHE_DAEMON
 build::
 	# Terminate any sccache server that might still be around.
 	-$(MOZBUILD_MANAGE_SCCACHE_DAEMON) --stop-server > /dev/null 2>&1
 	# Start a new server, ensuring it gets the jobserver file descriptors
 	# from make (but don't use the + prefix when make -n is used, so that
--- a/python/mozbuild/mozbuild/controller/building.py
+++ b/python/mozbuild/mozbuild/controller/building.py
@@ -1353,16 +1353,22 @@ class BuildDriver(MozbuildObject):
                                         mozpath.normsep(mozconfig['path']))
             mozconfig_make_lines.append(b'export FOUND_MOZCONFIG')
 
         mozconfig_client_mk = os.path.join(self.topobjdir,
                                            '.mozconfig-client-mk')
         with FileAvoidWrite(mozconfig_client_mk) as fh:
             fh.write(b'\n'.join(mozconfig_make_lines))
 
+        if mozconfig_make_lines:
+            self.log(logging.WARNING, 'mozconfig_content', {
+                'path': mozconfig['path'],
+                'content': '\n    '.join(mozconfig_make_lines),
+            }, 'Adding make options from {path}\n    {content}')
+
         append_env['OBJDIR'] = mozpath.normsep(self.topobjdir)
 
         return self._run_make(srcdir=True,
                               filename='client.mk',
                               allow_parallel=False,
                               ensure_exit_code=False,
                               print_directory=False,
                               target=target,