bug 1490325 - write sccache log directly to artifact directory, make logs slightly more verbose. r=mshal
authorTed Mielczarek <ted@mielczarek.org>
Tue, 18 Sep 2018 20:02:17 +0000
changeset 492751 0780fdf31ce1a59db9cdaefe3319006a6e23035c
parent 492750 1ab93555c039a9efeb77fe8722be10c05c602229
child 492752 dd312261972d6b279ea102c5f6368da408464e27
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1490325
milestone64.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 1490325 - write sccache log directly to artifact directory, make logs slightly more verbose. r=mshal This patch makes it so we write the sccache log directly to the artifact directory, so that it will be uploaded even if the build fails. It also makes the log slightly more verbose. Both of these should help with diagnosing sccache failures in CI. The sccache log will no longer be explicitly gzip compressed, but some Taskcluster client implementations will store it as gzip compressed. Differential Revision: https://phabricator.services.mozilla.com/D6187
Makefile.in
build/mozconfig.cache
client.mk
--- a/Makefile.in
+++ b/Makefile.in
@@ -235,21 +235,16 @@ endif
 include $(topsrcdir)/config/rules.mk
 
 ifdef SCCACHE_VERBOSE_STATS
 default::
 	-$(CCACHE) --show-stats --stats-format=json > sccache-stats.json
 	@echo "===SCCACHE STATS==="
 	-$(CCACHE) --show-stats
 	@echo "==================="
-ifndef MOZ_PROFILE_GENERATE
-# Ideally we'd do that in the same file as we set the sccache.log location for
-# sccache, but it's too late in the build.
-	-gzip -9 $(DIST)/sccache.log
-endif
 endif
 
 distclean::
 	$(RM) $(DIST_GARBAGE)
 
 ifdef MOZ_CRASHREPORTER
 include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
 
--- a/build/mozconfig.cache
+++ b/build/mozconfig.cache
@@ -70,17 +70,16 @@ if test -n "$bucket"; then
     case "$master" in
     *us[ew][12].mozilla.com*|*euc1.mozilla.com*)
         mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253"
         ;;
     esac
     export CCACHE="$topsrcdir/sccache2/sccache${suffix}"
     export SCCACHE_VERBOSE_STATS=1
     mk_add_options MOZBUILD_MANAGE_SCCACHE_DAEMON=${topsrcdir}/sccache2/sccache
-    mk_add_options "UPLOAD_EXTRA_FILES+=sccache.log.gz"
     case "$platform" in
     win*)
         # For now, sccache doesn't support separate PDBs so force debug info to be
         # in object files.
         mk_add_options "export COMPILE_PDB_FLAG="
         mk_add_options "export HOST_PDB_FLAG="
         mk_add_options "export MOZ_DEBUG_FLAGS=-Z7"
         ;;
--- a/client.mk
+++ b/client.mk
@@ -77,17 +77,18 @@ endif
 # 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
 	# the command doesn't run in that case)
-	$(if $(findstring n,$(filter-out --%, $(MAKEFLAGS))),,+)env RUST_LOG=sccache::compiler=debug SCCACHE_ERROR_LOG=$(OBJDIR)/dist/sccache.log $(MOZBUILD_MANAGE_SCCACHE_DAEMON) --start-server
+	mkdir -p $(UPLOAD_PATH)
+	$(if $(findstring n,$(filter-out --%, $(MAKEFLAGS))),,+)env RUST_LOG=sccache=debug SCCACHE_ERROR_LOG=$(UPLOAD_PATH)/sccache.log $(MOZBUILD_MANAGE_SCCACHE_DAEMON) --start-server
 endif
 
 ####################################
 # Configure
 
 MAKEFILE      = $(wildcard $(OBJDIR)/Makefile)
 CONFIG_STATUS = $(wildcard $(OBJDIR)/config.status)