Port Bug 1006956, Bug 1007991, and Bug 1009359 to comm-central to fix check-sync-dirs orange. rs=bustage
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 16 May 2014 08:29:42 -0400
changeset 20112 fede43de894a4548070aa74fb3be3106425c40c7
parent 20111 89b7a9974c32e34ac81d3296bdeb77de7ca8a682
child 20113 6c52a4703dcd6fe6f1e63e9abac05b3c140b1f57
push idunknown
push userunknown
push dateunknown
reviewersbustage
bugs1006956, 1007991, 1009359
Port Bug 1006956, Bug 1007991, and Bug 1009359 to comm-central to fix check-sync-dirs orange. rs=bustage
build/mozconfig.cache
client.mk
--- a/build/mozconfig.cache
+++ b/build/mozconfig.cache
@@ -8,39 +8,51 @@
 if test -z "$bucket"; 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 "$no_sccache"; then
-    case "${branch}_${master}" in
-    try_*scl1.mozilla.com*|try_*.scl3.mozilla.com*)
-        case "$platform" in
-        win*)
-            bucket=mozilla-releng-ceph-cache-scl3-try
+    case "${branch}" in
+    try)
+        case "${master}" in
+        *scl1.mozilla.com*|*.scl3.mozilla.com*)
+            case "$platform" in
+            win*)
+                bucket=mozilla-releng-ceph-cache-scl3-try
+                ;;
+            *)
+                bucket=mozilla-releng-s3-cache-us-west-2-try
+                ;;
+            esac
+            mk_add_options "export SCCACHE_NO_HTTPS=1"
             ;;
-        *)
+        *use1.mozilla.com*)
+            bucket=mozilla-releng-s3-cache-us-east-1-try
+            ;;
+        *usw2.mozilla.com*)
             bucket=mozilla-releng-s3-cache-us-west-2-try
             ;;
         esac
-        mk_add_options "export SCCACHE_NO_HTTPS=1"
         ;;
-    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
-        ;;
-    b2g-inbound_*usw2.mozilla.com*)
-        bucket=mozilla-releng-s3-cache-us-west-2-prod
+    b2g-inbound|mozilla-inbound|fx-team)
+        case "${master}" in
+        *use1.mozilla.com*)
+            if test -z "$MOZ_PGO"; then
+                bucket=mozilla-releng-s3-cache-us-east-1-prod
+            fi
+            ;;
+        *usw2.mozilla.com*)
+            if test -z "$MOZ_PGO"; then
+                bucket=mozilla-releng-s3-cache-us-west-2-prod
+            fi
+            ;;
+        esac
         ;;
     esac
 fi
 
 if test -z "$bucket"; then
     case "$platform" in
     win*) : ;;
     *)
@@ -51,17 +63,17 @@ else
     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_ALL+=build/sccache.mk
     mk_add_options MOZ_POSTFLIGHT_ALL+=build/sccache.mk
-    UPLOAD_EXTRA_FILES="sccache.log.gz"
+    UPLOAD_EXTRA_FILES="$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/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))
 
 # 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.
 MOZCONFIG_OUT_LINES := $(subst $(CR), ,$(subst $(NULL) $(NULL),||,$(MOZCONFIG_CONTENT)))
 # Filter-out comments from those lines.