Bumping manifests a=b2g-bump
[gecko.git] / build / mozconfig.cache
blobc003f5f6ea4dcfff64829b7a4fa336d27dd1ac1d
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 # Setup for build cache
7 # Avoid duplication if the file happens to be included twice.
8 if test -z "$bucket"; then
10 read branch platform master <<EOF
11 $(python2.7 -c 'import json; p = json.loads(open("'"$topsrcdir"'/../buildprops.json").read())["properties"]; print p["branch"], p["platform"], p["master"]' 2> /dev/null)
12 EOF
14 bucket=
15 if test -z "$SCCACHE_DISABLE" -a -z "$no_sccache"; then
16     case "${branch}" in
17     try)
18         case "${master}" in
19         *scl1.mozilla.com*|*.scl3.mozilla.com*)
20             bucket=mozilla-releng-s3-cache-us-west-1-try
21             ;;
22         *use1.mozilla.com*)
23             bucket=mozilla-releng-s3-cache-us-east-1-try
24             ;;
25         *usw2.mozilla.com*)
26             bucket=mozilla-releng-s3-cache-us-west-2-try
27             ;;
28         esac
29         ;;
30     b2g-inbound|mozilla-inbound|fx-team)
31         case "${master}" in
32         *use1.mozilla.com*)
33             if test -z "$MOZ_PGO"; then
34                 bucket=mozilla-releng-s3-cache-us-east-1-prod
35             fi
36             ;;
37         *usw2.mozilla.com*)
38             if test -z "$MOZ_PGO"; then
39                 bucket=mozilla-releng-s3-cache-us-west-2-prod
40             fi
41             ;;
42         esac
43         ;;
44     esac
47 if test -z "$bucket"; then
48     case "$platform" in
49     win*) : ;;
50     *)
51         ac_add_options --with-ccache
52     esac
53 else
54     mk_add_options "export SCCACHE_BUCKET=$bucket"
55     case "$master" in
56     *use1.mozilla.com*|*usw2.mozilla.com*)
57         mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253"
58         ;;
59     esac
60     ac_add_options "--with-compiler-wrapper=python2.7 $topsrcdir/sccache/sccache.py"
61     mk_add_options MOZ_PREFLIGHT_ALL+=build/sccache.mk
62     mk_add_options MOZ_POSTFLIGHT_ALL+=build/sccache.mk
63     mk_add_options "export UPLOAD_EXTRA_FILES+=sccache.log.gz"
64     case "$platform" in
65     win*)
66         # sccache supports a special flag to create depfiles.
67         export _DEPEND_CFLAGS='-deps$(MDDEPDIR)/$(@F).pp'
68         # Windows builds have a default wrapper that needs to be overridden
69         mk_add_options "export CC_WRAPPER="
70         mk_add_options "export CXX_WRAPPER="
71         # For now, sccache doesn't support separate PDBs so force debug info to be
72         # in object files.
73         mk_add_options "export COMPILE_PDB_FLAG="
74         mk_add_options "export HOST_PDB_FLAG="
75         mk_add_options "export MOZ_DEBUG_FLAGS=-Z7"
76         ;;
77     esac