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)
15 if test -z "$SCCACHE_DISABLE" -a -z "$no_sccache"; then
19 *scl1.mozilla.com*|*.scl3.mozilla.com*)
20 bucket=mozilla-releng-s3-cache-us-west-1-try
23 bucket=mozilla-releng-s3-cache-us-east-1-try
26 bucket=mozilla-releng-s3-cache-us-west-2-try
30 b2g-inbound|mozilla-inbound|fx-team)
33 if test -z "$MOZ_PGO"; then
34 bucket=mozilla-releng-s3-cache-us-east-1-prod
38 if test -z "$MOZ_PGO"; then
39 bucket=mozilla-releng-s3-cache-us-west-2-prod
47 if test -z "$bucket"; then
51 ac_add_options --with-ccache
54 mk_add_options "export SCCACHE_BUCKET=$bucket"
56 *use1.mozilla.com*|*usw2.mozilla.com*)
57 mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253"
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"
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
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"