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).
--- 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"