Bug 1006956 - Disable sccache on non-try PGO builds. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 15 May 2014 07:14:37 +0900
changeset 195770 5c6cf0b0f31e4d7ccbef22ce988927da8c77daea
parent 195769 44b0d6c49378c5b7e5366e704e011c396291ce20
child 195771 37cd8f374ed806e8e84135fba6c8b5a1ac79ad22
push id5990
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:40:24 +0000
treeherdermozilla-aurora@0796197efbc9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1006956
milestone32.0a1
Bug 1006956 - Disable sccache on non-try PGO builds. r=mshal
build/mozconfig.cache
client.mk
--- a/build/mozconfig.cache
+++ b/build/mozconfig.cache
@@ -20,20 +20,24 @@ if test -z "$SCCACHE_DISABLE" -a -z "$no
         ;;
     try_*use1.mozilla.com*)
         bucket=mozilla-releng-s3-cache-us-east-1-try
         ;;
     try_*usw2.mozilla.com*)
         bucket=mozilla-releng-s3-cache-us-west-2-try
         ;;
     b2g-inbound_*use1.mozilla.com*)
-        bucket=mozilla-releng-s3-cache-us-east-1-prod
+        if test -z "$MOZ_PGO"; then
+            bucket=mozilla-releng-s3-cache-us-east-1-prod
+        fi
         ;;
     b2g-inbound_*usw2.mozilla.com*)
-        bucket=mozilla-releng-s3-cache-us-west-2-prod
+        if test -z "$MOZ_PGO"; then
+            bucket=mozilla-releng-s3-cache-us-west-2-prod
+        fi
         ;;
     esac
 fi
 
 if test -z "$bucket"; then
     case "$platform" in
     win*) : ;;
     *)
--- a/client.mk
+++ b/client.mk
@@ -106,17 +106,18 @@ define CR
 
 endef
 
 # As $(shell) doesn't preserve newlines, use sed to replace them with an
 # unlikely sequence (||), which is then replaced back to newlines by make
 # before evaluation. $(shell) replacing newlines with spaces, || is always
 # followed by a space (since sed doesn't remove newlines), except on the
 # last line, so replace both '|| ' and '||'.
-MOZCONFIG_CONTENT := $(subst ||,$(CR),$(subst || ,$(CR),$(shell $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) | sed 's/$$/||/')))
+# Also, make MOZ_PGO available to mozconfig when passed on make command line.
+MOZCONFIG_CONTENT := $(subst ||,$(CR),$(subst || ,$(CR),$(shell MOZ_PGO=$(MOZ_PGO) $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) | sed 's/$$/||/')))
 $(eval $(MOZCONFIG_CONTENT))
 
 export FOUND_MOZCONFIG
 
 # As '||' was used as a newline separator, it means it's not occurring in
 # lines themselves. It can thus safely be used to replaces normal spaces,
 # to then replace newlines with normal spaces. This allows to get a list
 # of mozconfig output lines.