Bug 1423801: Use comm-central sccache buckets; r?Fallen
MozReview-Commit-ID: Hiuze3ySTh9
--- a/build/check-sync-exceptions
+++ b/build/check-sync-exceptions
@@ -4,16 +4,19 @@ merge-installrdf.py
pymake
client.py-args
client.py-l10n-args
configobj.py
mozconfig.cache
mozconfig.comm-support
virtualenv_packages.txt
+# Use comm-central buckets for sccache.
+mozconfig.sccache
+
# Ignore detritus left lying around by editing tools.
*~
.#*
#*#
*.orig
*.rej
# Ignore "compiled" python files
new file mode 100644
--- /dev/null
+++ b/build/mozconfig.sccache
@@ -0,0 +1,61 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# Setup for build cache
+
+if [ "$MOZ_IS_COMM_TOPDIR" != "1" ]; then
+
+# Avoid duplication if the file happens to be included twice.
+if test -z "$NO_CACHE" -a -z "$SCCACHE_DISABLE"; then
+
+# ${region} is set by m-c's build/mozconfig.cache
+if test -n "$region"; then
+ # set S3 bucket according to tree (level)
+ case "${COMM_HEAD_REPOSITORY}" in
+ *hg.mozilla.org/try-comm-central*)
+ bucket=comm-central-level-1-sccache-${region}
+ ;;
+ *hg.mozilla.org/comm-central*)
+ bucket=comm-central-level-3-sccache-${region}
+ ;;
+ esac
+fi
+
+if test -n "$bucket"; then
+ mk_add_options "export SCCACHE_BUCKET=$bucket"
+ mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253"
+ case "${SYSTEMROOT}" in
+ *Windows)
+ platform=win
+ ;;
+ *)
+ mk_add_options "export AWS_IAM_CREDENTIALS_URL=http://taskcluster/auth/v1/aws/s3/read-write/${bucket}/?format=iam-role-compat"
+ ;;
+ esac
+
+ export CCACHE="$topsrcdir/sccache2/sccache${suffix}"
+ export SCCACHE_VERBOSE_STATS=1
+ mk_add_options "MOZBUILD_MANAGE_SCCACHE_DAEMON=${topsrcdir}/sccache2/sccache"
+ mk_add_options "UPLOAD_EXTRA_FILES+=sccache.log.gz"
+
+ case "$platform" in
+ win)
+ # sccache supports a special flag to create depfiles.
+ #TODO: bug 1318370 - move this all into toolchain.configure
+ export _DEPEND_CFLAGS='-deps$(MDDEPDIR)/$(@F).pp'
+ # Windows builds have a default wrapper that needs to be overridden
+ mk_add_options "export CC_WRAPPER="
+ mk_add_options "export CXX_WRAPPER="
+ # For now, sccache doesn't support separate PDBs so force debug info to be
+ # in object files.
+ mk_add_options "export COMPILE_PDB_FLAG="
+ mk_add_options "export HOST_PDB_FLAG="
+ mk_add_options "export MOZ_DEBUG_FLAGS=-Z7"
+ ;;
+ esac
+fi
+
+fi # NO_CACHE && SCCACHE_DISABLE
+
+fi # MOZ_IS_COMM_TOPDIR
--- a/mail/config/mozconfigs/linux32/debug
+++ b/mail/config/mozconfigs/linux32/debug
@@ -23,9 +23,9 @@ export MOZ_DEBUG_SYMBOLS=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
-. "$topsrcdir/build/mozconfig.cache"
+. "$commtopsrcdir/build/mozconfig.sccache"
--- a/mail/config/mozconfigs/linux32/l10n-mozconfig
+++ b/mail/config/mozconfigs/linux32/l10n-mozconfig
@@ -1,3 +1,2 @@
. "$topsrcdir/build/mozconfig.comm-support"
. "$commtopsrcdir/mail/config/mozconfigs/l10n-common"
-
--- a/mail/config/mozconfigs/linux32/nightly
+++ b/mail/config/mozconfigs/linux32/nightly
@@ -29,9 +29,9 @@ MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
mk_add_options "export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=/builds/crash-stats-api.token"
-. "$topsrcdir/build/mozconfig.cache"
+. "$commtopsrcdir/build/mozconfig.sccache"
--- a/mail/config/mozconfigs/linux64/debug
+++ b/mail/config/mozconfigs/linux64/debug
@@ -23,9 +23,9 @@ export MOZ_DEBUG_SYMBOLS=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
-. "$topsrcdir/build/mozconfig.cache"
+. "$commtopsrcdir/build/mozconfig.sccache"
--- a/mail/config/mozconfigs/linux64/nightly
+++ b/mail/config/mozconfigs/linux64/nightly
@@ -29,9 +29,9 @@ MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
mk_add_options "export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=/builds/crash-stats-api.token"
-. "$topsrcdir/build/mozconfig.cache"
+. "$commtopsrcdir/build/mozconfig.sccache"
--- a/mail/config/mozconfigs/macosx64/debug
+++ b/mail/config/mozconfigs/macosx64/debug
@@ -14,18 +14,17 @@ export MOZ_DEBUG_SYMBOLS=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
-. "$topsrcdir/build/mozconfig.cache"
-
+. "$commtopsrcdir/build/mozconfig.sccache"
if [ "$MOZ_IS_COMM_TOPDIR" = "1" ]; then
# XXX hack to work around dsymutil failing on OSX builds (bug 1380381, 1382262)
ac_add_options RUSTFLAGS='-C debuginfo=1'
# https://bugzilla.mozilla.org/show_bug.cgi?id=1424825
mk_add_options "CLIENT_PY_ARGS += --fixup-rust-vendoring-bug-1424825"
fi
--- a/mail/config/mozconfigs/macosx64/nightly
+++ b/mail/config/mozconfigs/macosx64/nightly
@@ -18,17 +18,17 @@ export MOZ_TELEMETRY_REPORTING=1
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
-. "$topsrcdir/build/mozconfig.cache"
+. "$commtopsrcdir/build/mozconfig.sccache"
if [ "$MOZ_IS_COMM_TOPDIR" = "1" ]; then
# XXX hack to work around dsymutil failing on OSX builds (bug 1380381, 1382262)
ac_add_options RUSTFLAGS='-C debuginfo=1'
# https://bugzilla.mozilla.org/show_bug.cgi?id=1424825
mk_add_options "CLIENT_PY_ARGS += --fixup-rust-vendoring-bug-1424825"
fi
--- a/mail/config/mozconfigs/win32/debug
+++ b/mail/config/mozconfigs/win32/debug
@@ -15,16 +15,18 @@ export MOZ_DEBUG_SYMBOLS=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
+. "$commtopsrcdir/build/mozconfig.sccache"
+
. $topsrcdir/build/win32/mozconfig.vs-latest
# Set up mapi includes (must be done after visual studio setup)
export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
mk_export_correct_style INCLUDE
if [ "$MOZ_IS_COMM_TOPDIR" == "1" ]; then
# Use the TOOLTOOL provided xz for mar generation.
--- a/mail/config/mozconfigs/win32/nightly
+++ b/mail/config/mozconfigs/win32/nightly
@@ -19,16 +19,18 @@ export MOZILLA_OFFICIAL=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
+. "$commtopsrcdir/build/mozconfig.sccache"
+
. $topsrcdir/build/win32/mozconfig.vs-latest
# Set up mapi includes (must be done after visual studio setup)
export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
mk_export_correct_style INCLUDE
if [ "$MOZ_IS_COMM_TOPDIR" == "1" ]; then
# Use the TOOLTOOL provided xz for mar generation.
--- a/mail/config/mozconfigs/win64/debug
+++ b/mail/config/mozconfigs/win64/debug
@@ -15,16 +15,18 @@ export MOZILLA_OFFICIAL=1
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
+. "$commtopsrcdir/build/mozconfig.sccache"
+
. $topsrcdir/build/win64/mozconfig.vs-latest
# Set up mapi includes (must be done after visual studio setup)
export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
mk_export_correct_style INCLUDE
if [ "$MOZ_IS_COMM_TOPDIR" == "1" ]; then
# Use the TOOLTOOL provided xz for mar generation.
--- a/mail/config/mozconfigs/win64/nightly
+++ b/mail/config/mozconfigs/win64/nightly
@@ -19,16 +19,18 @@ export MOZ_TELEMETRY_REPORTING=1
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=0
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_ADDON_SIGNING=0
# Package js shell
export MOZ_PACKAGE_JSSHELL=1
+. "$commtopsrcdir/build/mozconfig.sccache"
+
. $topsrcdir/build/win64/mozconfig.vs-latest
# Set up mapi includes (must be done after visual studio setup)
export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
mk_export_correct_style INCLUDE
if [ "$MOZ_IS_COMM_TOPDIR" == "1" ]; then
# Use the TOOLTOOL provided xz for mar generation.