Bug 1005495 - Move sccache stats out of the build log. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 07 May 2014 11:50:09 +0900
changeset 181927 41708cef5ec182544769d9d18776958aa79d27cd
parent 181926 80779d35e8717fda6d035b4b1f8a6d30f74f5cb7
child 181928 5fb3807811b780cbbedf8d782e42cf2efc6836e4
push id6674
push usercbook@mozilla.com
push dateWed, 07 May 2014 12:19:02 +0000
treeherderfx-team@d8fdc3e3c74a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1005495
milestone32.0a1
Bug 1005495 - Move sccache stats out of the build log. r=mshal
build/mozconfig.cache
build/sccache.mk
configure.in
--- a/build/mozconfig.cache
+++ b/build/mozconfig.cache
@@ -39,18 +39,19 @@ if test -z "$bucket"; then
 else
     mk_add_options "export SCCACHE_BUCKET=$bucket"
     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+=build/sccache.mk
-    mk_add_options MOZ_POSTFLIGHT+=build/sccache.mk
+    mk_add_options MOZ_PREFLIGHT_ALL+=build/sccache.mk
+    mk_add_options MOZ_POSTFLIGHT_ALL+=build/sccache.mk
+    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/build/sccache.mk
+++ b/build/sccache.mk
@@ -1,7 +1,18 @@
-preflight:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+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
 	-python2.7 $(TOPSRCDIR)/sccache/sccache.py > /dev/null 2>&1
 
-postflight:
+postflight_all:
 	# Terminate sccache server. This prints sccache stats.
-	-python2.7 $(TOPSRCDIR)/sccache/sccache.py
+	-python2.7 $(TOPSRCDIR)/sccache/sccache.py 2>&1 | gzip > $(BASE_DIR)/dist/sccache.log.gz
--- a/configure.in
+++ b/configure.in
@@ -8978,16 +8978,18 @@ fi
 if test -n "$JS_SHARED_LIBRARY"; then
   MOZ_JS_LIBS="$MOZ_JS_SHARED_LIBS"
 else
   MOZ_JS_LIBS="$MOZ_JS_STATIC_LIBS"
   AC_DEFINE(MOZ_STATIC_JS)
 fi
 AC_SUBST(JS_SHARED_LIBRARY)
 
+AC_SUBST(UPLOAD_EXTRA_FILES)
+
 MOZ_CREATE_CONFIG_STATUS()
 
 # No need to run subconfigures when building with LIBXUL_SDK_DIR
 if test "$COMPILE_ENVIRONMENT" -a -z "$LIBXUL_SDK_DIR"; then
   MOZ_SUBCONFIGURE_ICU()
   MOZ_SUBCONFIGURE_FFI()
 fi