bug 1490325 - write sccache log directly to artifact directory, make logs slightly more verbose. r=mshal draft
authorTed Mielczarek <ted@mielczarek.org>
Tue, 18 Sep 2018 20:02:17 +0000
changeset 1749809 cd644180bd7ac3eef018329c760380262ddee762
parent 1749808 e1cb04bec1176b555c50d0672ea710dbeab1b84a
child 1749810 ccb65c68fc5333420fdb0013f94eaa03337b84bc
push id312909
push usermozilla@hocat.ca
push dateTue, 06 Nov 2018 22:50:00 +0000
treeherdertry@38f6ced8fc97 [default view] [failures only]
reviewersmshal
bugs1490325
milestone60.3.1
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
@@ -250,21 +250,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*)
         # sccache supports a special flag to create depfiles.
         #TODO: bug 1318370 - move this all into toolchain.configure
         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="
--- 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)