michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: # Setup for build cache michael@0: michael@0: read branch platform master < /dev/null) michael@0: EOF michael@0: michael@0: bucket= michael@0: if test -z "$SCCACHE_DISABLE" -a -z "$no_sccache"; then michael@0: case "${branch}_${master}" in michael@0: try_*scl1.mozilla.com*|try_*.scl3.mozilla.com*) michael@0: bucket=mozilla-releng-ceph-cache-scl3-try michael@0: mk_add_options "export SCCACHE_NO_HTTPS=1" michael@0: ;; michael@0: try_*use1.mozilla.com*) michael@0: bucket=mozilla-releng-s3-cache-us-east-1-try michael@0: ;; michael@0: try_*usw2.mozilla.com*) michael@0: bucket=mozilla-releng-s3-cache-us-west-2-try michael@0: ;; michael@0: esac michael@0: fi michael@0: michael@0: if test -z "$bucket"; then michael@0: case "$platform" in michael@0: win*) : ;; michael@0: *) michael@0: ac_add_options --with-ccache michael@0: esac michael@0: else michael@0: mk_add_options "export SCCACHE_BUCKET=$bucket" michael@0: case "$master" in michael@0: *use1.mozilla.com*|*usw2.mozilla.com*) michael@0: mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253" michael@0: ;; michael@0: esac michael@0: ac_add_options "--with-compiler-wrapper=python2.7 $topsrcdir/sccache/sccache.py" michael@0: mk_add_options MOZ_PREFLIGHT+=build/sccache.mk michael@0: mk_add_options MOZ_POSTFLIGHT+=build/sccache.mk michael@0: case "$platform" in michael@0: win*) michael@0: # sccache supports a special flag to create depfiles. michael@0: export _DEPEND_CFLAGS='-deps$(MDDEPDIR)/$(@F).pp' michael@0: # Windows builds have a default wrapper that needs to be overridden michael@0: mk_add_options "export CC_WRAPPER=" michael@0: mk_add_options "export CXX_WRAPPER=" michael@0: # For now, sccache doesn't support separate PDBs so force debug info to be michael@0: # in object files. michael@0: mk_add_options "export COMPILE_PDB_FLAG=" michael@0: mk_add_options "export HOST_PDB_FLAG=" michael@0: mk_add_options "export MOZ_DEBUG_FLAGS=-Z7" michael@0: ;; michael@0: esac michael@0: fi