1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/build/mozconfig.cache Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 1.4 +# This Source Code Form is subject to the terms of the Mozilla Public 1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.7 + 1.8 +# Setup for build cache 1.9 + 1.10 +read branch platform master <<EOF 1.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) 1.12 +EOF 1.13 + 1.14 +bucket= 1.15 +if test -z "$SCCACHE_DISABLE" -a -z "$no_sccache"; then 1.16 + case "${branch}_${master}" in 1.17 + try_*scl1.mozilla.com*|try_*.scl3.mozilla.com*) 1.18 + bucket=mozilla-releng-ceph-cache-scl3-try 1.19 + mk_add_options "export SCCACHE_NO_HTTPS=1" 1.20 + ;; 1.21 + try_*use1.mozilla.com*) 1.22 + bucket=mozilla-releng-s3-cache-us-east-1-try 1.23 + ;; 1.24 + try_*usw2.mozilla.com*) 1.25 + bucket=mozilla-releng-s3-cache-us-west-2-try 1.26 + ;; 1.27 + esac 1.28 +fi 1.29 + 1.30 +if test -z "$bucket"; then 1.31 + case "$platform" in 1.32 + win*) : ;; 1.33 + *) 1.34 + ac_add_options --with-ccache 1.35 + esac 1.36 +else 1.37 + mk_add_options "export SCCACHE_BUCKET=$bucket" 1.38 + case "$master" in 1.39 + *use1.mozilla.com*|*usw2.mozilla.com*) 1.40 + mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253" 1.41 + ;; 1.42 + esac 1.43 + ac_add_options "--with-compiler-wrapper=python2.7 $topsrcdir/sccache/sccache.py" 1.44 + mk_add_options MOZ_PREFLIGHT+=build/sccache.mk 1.45 + mk_add_options MOZ_POSTFLIGHT+=build/sccache.mk 1.46 + case "$platform" in 1.47 + win*) 1.48 + # sccache supports a special flag to create depfiles. 1.49 + export _DEPEND_CFLAGS='-deps$(MDDEPDIR)/$(@F).pp' 1.50 + # Windows builds have a default wrapper that needs to be overridden 1.51 + mk_add_options "export CC_WRAPPER=" 1.52 + mk_add_options "export CXX_WRAPPER=" 1.53 + # For now, sccache doesn't support separate PDBs so force debug info to be 1.54 + # in object files. 1.55 + mk_add_options "export COMPILE_PDB_FLAG=" 1.56 + mk_add_options "export HOST_PDB_FLAG=" 1.57 + mk_add_options "export MOZ_DEBUG_FLAGS=-Z7" 1.58 + ;; 1.59 + esac 1.60 +fi