Bug 1188766 - Avoid exporting UPLOAD_EXTRA_FILES from mozconfig
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 06 Aug 2015 14:33:54 +0900
changeset 523049 21829aaf72e1ae094c6de7a35f3dcfaeb85ce5b8
parent 523048 de175d7e8eb26fddb0087bcc202bed58dd17f33d
child 523130 ce78ec95dca66532696de5da04c8414298712e81
push id81997
push usermh@glandium.org
push dateThu, 06 Aug 2015 05:44:27 +0000
treeherdertry@21829aaf72e1 [default view] [failures only]
bugs1188766
milestone42.0a1
Bug 1188766 - Avoid exporting UPLOAD_EXTRA_FILES from mozconfig 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. try: -b o -p macosx64 -t none -u none
build/mozconfig.cache
client.mk
--- a/build/mozconfig.cache
+++ b/build/mozconfig.cache
@@ -59,17 +59,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,30 @@ 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.
+$(warning $(MOZCONFIG_OUT_LINES))
+MOZCONFIG_MK_LINES := $(filter export||% UPLOAD_EXTRA_FILES% %UPLOAD_EXTRA_FILES%,$(MOZCONFIG_OUT_LINES))
+$(warning $(MOZCONFIG_MK_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