Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 4 | |
michael@0 | 5 | # Setup for build cache |
michael@0 | 6 | |
michael@0 | 7 | read branch platform master <<EOF |
michael@0 | 8 | $(python2.7 -c 'import json; p = json.loads(open("'"$topsrcdir"'/../buildprops.json").read())["properties"]; print p["branch"], p["platform"], p["master"]' 2> /dev/null) |
michael@0 | 9 | EOF |
michael@0 | 10 | |
michael@0 | 11 | bucket= |
michael@0 | 12 | if test -z "$SCCACHE_DISABLE" -a -z "$no_sccache"; then |
michael@0 | 13 | case "${branch}_${master}" in |
michael@0 | 14 | try_*scl1.mozilla.com*|try_*.scl3.mozilla.com*) |
michael@0 | 15 | bucket=mozilla-releng-ceph-cache-scl3-try |
michael@0 | 16 | mk_add_options "export SCCACHE_NO_HTTPS=1" |
michael@0 | 17 | ;; |
michael@0 | 18 | try_*use1.mozilla.com*) |
michael@0 | 19 | bucket=mozilla-releng-s3-cache-us-east-1-try |
michael@0 | 20 | ;; |
michael@0 | 21 | try_*usw2.mozilla.com*) |
michael@0 | 22 | bucket=mozilla-releng-s3-cache-us-west-2-try |
michael@0 | 23 | ;; |
michael@0 | 24 | esac |
michael@0 | 25 | fi |
michael@0 | 26 | |
michael@0 | 27 | if test -z "$bucket"; then |
michael@0 | 28 | case "$platform" in |
michael@0 | 29 | win*) : ;; |
michael@0 | 30 | *) |
michael@0 | 31 | ac_add_options --with-ccache |
michael@0 | 32 | esac |
michael@0 | 33 | else |
michael@0 | 34 | mk_add_options "export SCCACHE_BUCKET=$bucket" |
michael@0 | 35 | case "$master" in |
michael@0 | 36 | *use1.mozilla.com*|*usw2.mozilla.com*) |
michael@0 | 37 | mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253" |
michael@0 | 38 | ;; |
michael@0 | 39 | esac |
michael@0 | 40 | ac_add_options "--with-compiler-wrapper=python2.7 $topsrcdir/sccache/sccache.py" |
michael@0 | 41 | mk_add_options MOZ_PREFLIGHT+=build/sccache.mk |
michael@0 | 42 | mk_add_options MOZ_POSTFLIGHT+=build/sccache.mk |
michael@0 | 43 | case "$platform" in |
michael@0 | 44 | win*) |
michael@0 | 45 | # sccache supports a special flag to create depfiles. |
michael@0 | 46 | export _DEPEND_CFLAGS='-deps$(MDDEPDIR)/$(@F).pp' |
michael@0 | 47 | # Windows builds have a default wrapper that needs to be overridden |
michael@0 | 48 | mk_add_options "export CC_WRAPPER=" |
michael@0 | 49 | mk_add_options "export CXX_WRAPPER=" |
michael@0 | 50 | # For now, sccache doesn't support separate PDBs so force debug info to be |
michael@0 | 51 | # in object files. |
michael@0 | 52 | mk_add_options "export COMPILE_PDB_FLAG=" |
michael@0 | 53 | mk_add_options "export HOST_PDB_FLAG=" |
michael@0 | 54 | mk_add_options "export MOZ_DEBUG_FLAGS=-Z7" |
michael@0 | 55 | ;; |
michael@0 | 56 | esac |
michael@0 | 57 | fi |