bug 1286934 - sccache2 logging hacks
authorTed Mielczarek <ted@mielczarek.org>
Thu, 28 Jul 2016 15:44:18 -0400
changeset 817599 72cf3f8cb66e871c7cae49f18a5ec1a9ffaf0945
parent 811587 383db63d978c1764dc11aa3ed4fb4f5c0fbfc0a2
child 817600 0c8fc25fd60d2290aedb13cb4fbdec2855778e04
child 817658 14ddee7ac2589780209c9d1d564d6ec4f68e5f01
child 817962 4cc9f997343082e497636cfeeb9fae5fd10a5045
child 821240 1768c80947f2067f9d2eabc488eb8faeed525317
push id137936
push usertmielczarek@mozilla.com
push dateMon, 08 Aug 2016 18:15:07 +0000
treeherdertry@0c8fc25fd60d [default view] [failures only]
bugs1286934
milestone50.0a1
bug 1286934 - sccache2 logging hacks MozReview-Commit-ID: 6SqpzSSZRVx
build/sccache.mk
client.mk
config/config.mk
configure.in
dumpsccachelog.sh
--- a/build/sccache.mk
+++ b/build/sccache.mk
@@ -6,13 +6,14 @@ ifdef OBJDIR
 BASE_DIR = $(OBJDIR)
 else
 # OSX Universal builds only do upload in the first MOZ_BUILD_PROJECTS
 BASE_DIR = $(MOZ_OBJDIR)/$(firstword $(MOZ_BUILD_PROJECTS))
 endif
 
 preflight_all:
 	# Terminate any sccache server that might still be around
-	-$(TOPSRCDIR)/sccache/sccache --stop-server > /dev/null 2>&1
+	-$(TOPSRCDIR)/sccache2/sccache --stop-server > /dev/null 2>&1
+	-cd $(TOPSRCDIR) && SCCACHE2_LOG_LEVEL=debug $(TOPSRCDIR)/sccache2/sccache --start-server
 
 postflight_all:
 	# Terminate sccache server. This prints sccache stats.
-	-$(TOPSRCDIR)/sccache/sccache --stop-server 2>&1 | gzip > $(BASE_DIR)/dist/sccache.log.gz
+	-$(TOPSRCDIR)/sccache2/sccache --stop-server 2>&1 | gzip > $(BASE_DIR)/dist/sccache.log.gz
--- a/client.mk
+++ b/client.mk
@@ -370,18 +370,17 @@ ifdef FOUND_MOZCONFIG
 endif
 
 configure:: $(configure-preqs)
 	$(call BUILDSTATUS,TIERS configure)
 	$(call BUILDSTATUS,TIER_START configure)
 	@echo cd $(OBJDIR);
 	@echo $(CONFIGURE) $(CONFIGURE_ARGS)
 	@cd $(OBJDIR) && $(BUILD_PROJECT_ARG) $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \
-	  || ( echo '*** Fix above errors and then restart with\
-               "$(MAKE) -f client.mk build"' && exit 1 )
+	  || ( $(TOPSRCDIR)/dumpsccachelog.sh && exit 1 )
 	@touch $(OBJDIR)/Makefile
 	$(call BUILDSTATUS,TIER_FINISH configure)
 
 ifneq (,$(MAKEFILE))
 $(OBJDIR)/Makefile: $(OBJDIR)/config.status
 
 $(OBJDIR)/config.status: $(CONFIG_STATUS_DEPS)
 else
@@ -405,17 +404,17 @@ ifdef MOZ_PREFLIGHT
 	  $(MAKE) -f $(TOPSRCDIR)/$$mkfile preflight TOPSRCDIR=$(TOPSRCDIR) OBJDIR=$(OBJDIR) MOZ_OBJDIR=$(MOZ_OBJDIR); \
 	done
 endif
 
 ####################################
 # Build it
 
 realbuild::  $(OBJDIR)/Makefile $(OBJDIR)/config.status
-	+$(MOZ_MAKE)
+	+$(MOZ_MAKE) || ($(TOPSRCDIR)/dumpsccachelog.sh && exit 1)
 
 ####################################
 # Other targets
 
 # Pass these target onto the real build system
 $(OBJDIR_TARGETS):: $(OBJDIR)/Makefile $(OBJDIR)/config.status
 	+$(MOZ_MAKE) $@
 
--- a/config/config.mk
+++ b/config/config.mk
@@ -12,16 +12,18 @@
 #
 
 # Define an include-at-most-once flag
 ifdef INCLUDED_CONFIG_MK
 $(error Do not include config.mk twice!)
 endif
 INCLUDED_CONFIG_MK = 1
 
+export RUST_LOG=trace
+
 EXIT_ON_ERROR = set -e; # Shell loops continue past errors without this.
 
 ifndef topsrcdir
 topsrcdir	= $(DEPTH)
 endif
 
 ifndef INCLUDED_AUTOCONF_MK
 include $(DEPTH)/config/autoconf.mk
--- a/configure.in
+++ b/configure.in
@@ -15,10 +15,11 @@ dnl "manually", this file is actually an
 dnl autoconf, but doesn't call any autoconf macros. The `divert` line
 dnl below ensures the script that follows is output by autoconf.
 divert(0)dnl
 #!/bin/sh
 
 SRCDIR=$(dirname $0)
 TOPSRCDIR="$SRCDIR"
 export OLD_CONFIGURE="$SRCDIR"/old-configure
+export RUST_LOG=trace
 
 which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"
new file mode 100755
--- /dev/null
+++ b/dumpsccachelog.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+$(dirname $0)/sccache2/sccache --stop-server
+sleep 1
+echo "sccache2 log:"
+echo "======================="
+cat $(dirname $0)/sccache2.log
+echo "======================="