Bug 1188766 - Avoid exporting UPLOAD_EXTRA_FILES from mozconfig. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 06 Aug 2015 14:33:54 +0900
changeset 291441 0288a5a474785857fc52c32f2d83eb30fa799b06
parent 291440 b9f57927eb9e6d3a64574d2dad450b2ef220d69f
child 291442 b38760515fda177a19b48de50a021cfed1945d50
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1188766
milestone43.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 1188766 - Avoid exporting UPLOAD_EXTRA_FILES from mozconfig. r=mshal The way UPLOAD_EXTRA_FILES is currently exported makes the files added to the list added in each directory that is being traversed recursively because of the += in .mozconfig.mk, combined with "export". The easy way out is to remove the export altogether, but being unsure of the side effects of putting all non exported mk_add_options variables in .mozconfig.mk, limit this to UPLOAD_EXTRA_FILES.
build/mozconfig.cache
client.mk
--- a/build/mozconfig.cache
+++ b/build/mozconfig.cache
@@ -55,17 +55,17 @@ else
     case "$master" in
     *use1.mozilla.com*|*usw2.mozilla.com*)
         mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253"
         ;;
     esac
     ac_add_options "--with-compiler-wrapper=python2.7 $topsrcdir/sccache/sccache.py"
     mk_add_options MOZ_PREFLIGHT_ALL+=build/sccache.mk
     mk_add_options MOZ_POSTFLIGHT_ALL+=build/sccache.mk
-    mk_add_options "export UPLOAD_EXTRA_FILES+=sccache.log.gz"
+    mk_add_options "UPLOAD_EXTRA_FILES+=sccache.log.gz"
     case "$platform" in
     win*)
         # sccache supports a special flag to create depfiles.
         export _DEPEND_CFLAGS='-deps$(MDDEPDIR)/$(@F).pp'
         # Windows builds have a default wrapper that needs to be overridden
         mk_add_options "export CC_WRAPPER="
         mk_add_options "export CXX_WRAPPER="
         # For now, sccache doesn't support separate PDBs so force debug info to be
--- a/client.mk
+++ b/client.mk
@@ -185,33 +185,28 @@ WANT_MOZCONFIG_MK = 1
 else
 WANT_MOZCONFIG_MK =
 endif
 else
 WANT_MOZCONFIG_MK = 1
 endif
 
 ifdef WANT_MOZCONFIG_MK
-# For now, only output "export" lines from mach environment --format=client.mk output.
-MOZCONFIG_MK_LINES := $(filter export||%,$(MOZCONFIG_OUT_LINES))
-$(OBJDIR)/.mozconfig.mk: $(FOUND_MOZCONFIG) $(call mkdir_deps,$(OBJDIR)) $(OBJDIR)/CLOBBER
+# For now, only output "export" lines and lines containing UPLOAD_EXTRA_FILES
+# from mach environment --format=client.mk output.
+MOZCONFIG_MK_LINES := $(filter export||% UPLOAD_EXTRA_FILES% %UPLOAD_EXTRA_FILES%,$(MOZCONFIG_OUT_LINES))
+$(OBJDIR)/.mozconfig.mk: client.mk $(FOUND_MOZCONFIG) $(call mkdir_deps,$(OBJDIR)) $(OBJDIR)/CLOBBER
 	$(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
 endif
 
-# UPLOAD_EXTRA_FILES is appended to and exported from mozconfig, which makes
-# submakes as well as configure add even more to that, so just unexport it
-# for submakes to pick it from .mozconfig.mk and for configure to pick it
-# from mach environment.
-unexport UPLOAD_EXTRA_FILES
-
 # Print out any options loaded from mozconfig.
 all realbuild clean distclean export libs install realclean::
 ifneq (,$(strip $(MOZCONFIG_OUT_FILTERED)))
 	$(info Adding client.mk options from $(FOUND_MOZCONFIG):)
 	$(foreach line,$(MOZCONFIG_OUT_FILTERED),$(info $(NULL) $(NULL) $(NULL) $(NULL) $(subst ||, ,$(line))))
 endif
 
 # Windows equivalents