Skip to content

Commit

Permalink
Bug 1005495 - Move sccache stats out of the build log. r=mshal
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed May 7, 2014
1 parent 6682e4a commit 6b86419
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
5 changes: 3 additions & 2 deletions build/mozconfig.cache
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ else
;;
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.
Expand Down
17 changes: 14 additions & 3 deletions build/sccache.mk
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -8983,6 +8983,8 @@ else
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
Expand Down

0 comments on commit 6b86419

Please sign in to comment.