Bug 1382502 - Enable sccache on PGO builds. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 20 Jul 2017 11:31:14 +0900
changeset 419651 ed4688fd119a5c6714e78e67466eefe16b8e0ce1
parent 419650 78f62bcbe088bc85248910a3b02ed8c863e98986
child 419652 692beddc13e32b15237075354d1d575aa3946a29
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1382502, 1373460, 1181040, 1318370
milestone56.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 1382502 - Enable sccache on PGO builds. r=ted Note this will only enable it on try, autoland and mozilla-inbound, which are the only branches where sccache are enabled at the moment. Enabling on more builds (or not) is the subject of bug 1373460. Also note that bug 1181040, that ensured PGO builds weren't using sccache mentions that back then, link times went up when using sccache (with -Z7) vs. without, but that was presumably with MSVC 2013. Try suggests link times are the same using sccache now (still using -Z7, pending bug 1318370).
Makefile.in
build/mozconfig.cache
--- a/Makefile.in
+++ b/Makefile.in
@@ -243,20 +243,22 @@ default all::
 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
 
 endif
--- a/build/mozconfig.cache
+++ b/build/mozconfig.cache
@@ -9,17 +9,17 @@ if test -z "$bucket" -a -z "$NO_CACHE"; 
 
 # buildbot (or builders that use buildprops.json):
 if [ -f $topsrcdir/../buildprops.json ]; then
 read branch platform master <<EOF
 $(python2.7 -c 'import json; p = json.loads(open("'"$topsrcdir"'/../buildprops.json").read())["properties"]; print p["branch"], p["platform"], p["master"]' 2> /dev/null)
 EOF
 
 bucket=
-if test -z "$SCCACHE_DISABLE" -a -z "$MOZ_PGO_IS_SET" -a -z "$MOZ_PGO"; then
+if test -z "$SCCACHE_DISABLE"; then
     case "${branch}" in
     try)
         case "${master}" in
         *scl1.mozilla.com*|*.scl3.mozilla.com*)
             bucket=mozilla-releng-s3-cache-us-west-1-try
             ;;
         *use1.mozilla.com*)
             bucket=mozilla-releng-s3-cache-us-east-1-try
@@ -39,17 +39,17 @@ if test -z "$SCCACHE_DISABLE" -a -z "$MO
             ;;
         esac
         ;;
     esac
 fi
 fi
 
 # builds where buildprops didn't have the data (eg: taskcluster or non-buildbot) and without sccache disabled:
-if test -z "$bucket" -a -z "$SCCACHE_DISABLE" -a -z "$MOZ_PGO_IS_SET" -a -z "$MOZ_PGO"; then
+if test -z "$bucket" -a -z "$SCCACHE_DISABLE"; then
 
     # prevent rerun if az is set, or wget is not available
     if test -z "$availability_zone" -a -x "$(command -v wget)"; then
         if test -n "${TASKCLUSTER_WORKER_GROUP}"; then
             # TASKCLUSTER_WORKER_GROUP is just the region now, so
             # stick an extra character on to make the already-convoluted logic
             # here simpler.
             availability_zone="${TASKCLUSTER_WORKER_GROUP}x"