Bug 940788 - Use sccache on try for builds happening on AWS that currently use ccache. r=bhearsum
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 13 Feb 2014 10:05:59 +0900
changeset 168443 a62bde1d6efe
parent 168442 42ca2046b7e5
child 168473 2ffbe9ab79ea
push id26206
push usermh@glandium.org
push date2014-02-13 01:07 +0000
Treeherderresults
reviewersbhearsum
bugs940788
milestone30.0a1
Bug 940788 - Use sccache on try for builds happening on AWS that currently use ccache. r=bhearsum
b2g/config/mozconfigs/ics_armv7a_gecko/debug
b2g/config/mozconfigs/ics_armv7a_gecko/nightly
b2g/config/mozconfigs/linux32_gecko/nightly
b2g/config/mozconfigs/linux64_gecko/nightly
b2g/config/mozconfigs/macosx64_gecko/nightly
browser/config/mozconfigs/linux32/debug
browser/config/mozconfigs/linux32/nightly
browser/config/mozconfigs/linux64/debug
browser/config/mozconfigs/linux64/nightly
browser/config/mozconfigs/macosx-universal/l10n-mozconfig
browser/config/mozconfigs/macosx64/l10n-mozconfig
browser/config/mozconfigs/whitelist
browser/config/tooltool-manifests/linux32/releng.manifest
browser/config/tooltool-manifests/linux64/releng.manifest
build/mozconfig.cache
xulrunner/config/mozconfigs/linux32/xulrunner
xulrunner/config/mozconfigs/linux32/xulrunner-qt
xulrunner/config/mozconfigs/linux64/xulrunner
--- a/b2g/config/mozconfigs/ics_armv7a_gecko/debug
+++ b/b2g/config/mozconfigs/ics_armv7a_gecko/debug
@@ -8,15 +8,15 @@ ac_add_options --enable-b2g-camera
 ac_add_options --target=arm-linux-androideabi
 ac_add_options --with-gonk="$topsrcdir/gonk-toolchain"
 export TOOLCHAIN_HOST=linux-x86
 export GONK_PRODUCT=generic
 ac_add_options --with-gonk-toolchain-prefix="$topsrcdir/gonk-toolchain/prebuilt/$TOOLCHAIN_HOST/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-"
 ac_add_options --disable-elf-hack
 ac_add_options --enable-debug-symbols
 ac_add_options --enable-debug
-#ac_add_options --with-ccache
+#. "$topsrcdir/build/mozconfig.cache"
 ENABLE_MARIONETTE=1
 
 # Enable dump() from JS.
 export CXXFLAGS="-DMOZ_ENABLE_JS_DUMP -include $topsrcdir/gonk-toolchain/gonk-misc/Unicode.h -include $topsrcdir/gonk-toolchain/system/vold/ResponseCode.h"
 
 . "$topsrcdir/b2g/config/mozconfigs/common.override"
--- a/b2g/config/mozconfigs/ics_armv7a_gecko/nightly
+++ b/b2g/config/mozconfigs/ics_armv7a_gecko/nightly
@@ -9,15 +9,15 @@ ac_add_options --enable-updater
 ac_add_options --target=arm-linux-androideabi
 ac_add_options --with-gonk="$topsrcdir/gonk-toolchain"
 export TOOLCHAIN_HOST=linux-x86
 export GONK_PRODUCT=generic
 ac_add_options --with-gonk-toolchain-prefix="$topsrcdir/gonk-toolchain/prebuilt/$TOOLCHAIN_HOST/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-"
 ac_add_options --disable-elf-hack
 ac_add_options --enable-debug-symbols
 # ac_add_options --enable-profiling
-#ac_add_options --with-ccache
+#. "$topsrcdir/build/mozconfig.cache"
 ENABLE_MARIONETTE=1
 
 # Enable dump() from JS.
 export CXXFLAGS="-DMOZ_ENABLE_JS_DUMP -include $topsrcdir/gonk-toolchain/gonk-misc/Unicode.h -include $topsrcdir/gonk-toolchain/system/vold/ResponseCode.h"
 
 . "$topsrcdir/b2g/config/mozconfigs/common.override"
--- a/b2g/config/mozconfigs/linux32_gecko/nightly
+++ b/b2g/config/mozconfigs/linux32_gecko/nightly
@@ -17,17 +17,17 @@ STRIP_FLAGS="--strip-debug"
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
 # Treat warnings as errors in directories with FAIL_ON_WARNINGS.
 # DISABLED WHILE NOT ON TRY ac_add_options --enable-warnings-as-errors
 
 # Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
+. "$topsrcdir/build/mozconfig.cache"
 
 #B2G options
 ac_add_options --enable-application=b2g
 ENABLE_MARIONETTE=1
 ac_add_options --disable-elf-hack
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 GAIADIR=$topsrcdir/gaia
--- a/b2g/config/mozconfigs/linux64_gecko/nightly
+++ b/b2g/config/mozconfigs/linux64_gecko/nightly
@@ -17,17 +17,17 @@ STRIP_FLAGS="--strip-debug"
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
 # Treat warnings as errors in directories with FAIL_ON_WARNINGS.
 # DISABLED WHILE NOT ON TRY ac_add_options --enable-warnings-as-errors
 
 # Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
+. "$topsrcdir/build/mozconfig.cache"
 
 #B2G options
 ac_add_options --enable-application=b2g
 ENABLE_MARIONETTE=1
 ac_add_options --disable-elf-hack
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 GAIADIR=$topsrcdir/gaia
--- a/b2g/config/mozconfigs/macosx64_gecko/nightly
+++ b/b2g/config/mozconfigs/macosx64_gecko/nightly
@@ -15,16 +15,16 @@ export MOZ_TELEMETRY_REPORTING=1
 #ac_add_options --with-macbundlename-prefix=Firefox
 
 # Treat warnings as errors in directories with FAIL_ON_WARNINGS.
 ac_add_options --enable-warnings-as-errors
 
 # B2G Stuff
 ac_add_options --enable-application=b2g
 ac_add_options --enable-debug-symbols
-ac_add_options --with-ccache
+. "$topsrcdir/build/mozconfig.cache"
 ENABLE_MARIONETTE=1
 
 export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
 
 GAIADIR=$topsrcdir/gaia
 
 . "$topsrcdir/b2g/config/mozconfigs/common.override"
--- a/browser/config/mozconfigs/linux32/debug
+++ b/browser/config/mozconfigs/linux32/debug
@@ -5,17 +5,17 @@ ac_add_options --enable-signmar
 ac_add_options --disable-unified-compilation
 
 . $topsrcdir/build/unix/mozconfig.linux32
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 #Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
+. "$topsrcdir/build/mozconfig.cache"
 
 # Treat warnings as errors in directories with FAIL_ON_WARNINGS.
 ac_add_options --enable-warnings-as-errors
 
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 . "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/mozconfigs/linux32/nightly
+++ b/browser/config/mozconfigs/linux32/nightly
@@ -8,11 +8,11 @@ ac_add_options --disable-elf-hack # --en
 ac_add_options --enable-js-diagnostics
 
 # This will overwrite the default of stripping everything and keep the symbol table.
 # This is useful for profiling and debugging and only increases the package size
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
+. "$topsrcdir/build/mozconfig.cache"
 
 . "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/mozconfigs/linux64/debug
+++ b/browser/config/mozconfigs/linux64/debug
@@ -3,17 +3,17 @@ ac_add_options --enable-trace-malloc
 ac_add_options --enable-signmar
 
 . $topsrcdir/build/unix/mozconfig.linux
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 # Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
+. "$topsrcdir/build/mozconfig.cache"
 
 # Treat warnings as errors in directories with FAIL_ON_WARNINGS.
 ac_add_options --enable-warnings-as-errors
 
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 . "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/mozconfigs/linux64/nightly
+++ b/browser/config/mozconfigs/linux64/nightly
@@ -8,11 +8,11 @@ ac_add_options --disable-elf-hack # --en
 ac_add_options --enable-js-diagnostics
 
 # This will overwrite the default of stripping everything and keep the symbol table.
 # This is useful for profiling and debugging and only increases the package size
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 # Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
+. "$topsrcdir/build/mozconfig.cache"
 
 . "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/mozconfigs/macosx-universal/l10n-mozconfig
+++ b/browser/config/mozconfigs/macosx-universal/l10n-mozconfig
@@ -1,11 +1,11 @@
 . "$topsrcdir/browser/config/mozconfigs/common"
 
 ac_add_options --with-l10n-base=../../../l10n
 ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
 ac_add_options --enable-update-packaging
 ac_add_options --with-macbundlename-prefix=Firefox
-ac_add_options --with-ccache
+. "$topsrcdir/build/mozconfig.cache"
 
 export MOZILLA_OFFICIAL=1
 
 . "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/mozconfigs/macosx64/l10n-mozconfig
+++ b/browser/config/mozconfigs/macosx64/l10n-mozconfig
@@ -1,8 +1,8 @@
 . "$topsrcdir/browser/config/mozconfigs/common"
 
 ac_add_options --with-l10n-base=../../l10n
 ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
 ac_add_options --enable-update-packaging
-ac_add_options --with-ccache
+. "$topsrcdir/build/mozconfig.cache"
 
 . "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/mozconfigs/whitelist
+++ b/browser/config/mozconfigs/whitelist
@@ -24,36 +24,39 @@ for platform in ['linux32', 'linux64', '
     whitelist['nightly'][platform] += ['ac_add_options --enable-js-diagnostics']
 
 whitelist['nightly']['linux32'] += [
     'CXX=$REAL_CXX',
     'CXX="ccache $REAL_CXX"',
     'CC="ccache $REAL_CC"',
     'mk_add_options PROFILE_GEN_SCRIPT=@TOPSRCDIR@/build/profile_pageloader.pl',
     'ac_add_options --with-ccache=/usr/bin/ccache',
+    '. "$topsrcdir/build/mozconfig.cache"',
     'export MOZILLA_OFFICIAL=1',
     'export MOZ_TELEMETRY_REPORTING=1',
     "mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'",
     'STRIP_FLAGS="--strip-debug"',
     'ac_add_options --disable-elf-hack # --enable-elf-hack conflicts with --enable-profiling',
 ]
 
 whitelist['nightly']['linux64'] += [
     'export MOZILLA_OFFICIAL=1',
     'export MOZ_TELEMETRY_REPORTING=1',
     "mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'",
     'STRIP_FLAGS="--strip-debug"',
     'ac_add_options --with-ccache=/usr/bin/ccache',
+    '. "$topsrcdir/build/mozconfig.cache"',
     'ac_add_options --disable-elf-hack # --enable-elf-hack conflicts with --enable-profiling',
 ]
 
 whitelist['nightly']['macosx-universal'] += [
     'ac_add_options --with-macbundlename-prefix=Firefox',
     'mk_add_options MOZ_MAKE_FLAGS="-j12"',
     'ac_add_options --with-ccache',
+    '. "$topsrcdir/build/mozconfig.cache"',
     'ac_add_options --disable-install-strip',
     'ac_add_options --enable-instruments',
     'ac_add_options --enable-dtrace',
 ]
 
 whitelist['nightly']['win32'] += [
     '. $topsrcdir/configs/mozilla2/win32/include/choose-make-flags',
     'mk_add_options MOZ_MAKE_FLAGS=-j1',
--- a/browser/config/tooltool-manifests/linux32/releng.manifest
+++ b/browser/config/tooltool-manifests/linux32/releng.manifest
@@ -1,14 +1,20 @@
 [
 {
-"size": 40, 
-"digest": "459b332864aece4742cd1a6886e56cf3f202e5c27bb481cfae6145ce3e2e52fb34d1448788c6618e58a26a64e415341895326d293e0d2968e56efc0ae990acd0",
+"size": 81,
+"digest": "59002eae04fa3534df3bbb0026dff50d3872313551514f9ccdf33080c8b8e34a6295b3b6f2c078b3ddef099023897a42adb65d34c9364f84dac5b8e7d022bf39",
 "algorithm": "sha512", 
 "filename": "setup.sh"
 }, 
 {
 "size": 80458572,
 "digest": "e5101f9dee1e462f6cbd3897ea57eede41d23981825c7b20d91d23ab461875d54d3dfc24999aa58a31e8b01f49fb3140e05ffe5af2957ef1d1afb89fd0dfe1ad",
 "algorithm": "sha512", 
 "filename": "gcc.tar.xz"
+},
+{
+"size": 150816,
+"digest": "af25ecf03b65795d21f011939984b130db167a4efc4f306700f373854f9d7ae664662cb7812c3d737eace7f3735324daa6eb540b5e42f90189b0d9a8dd5f4c9f",
+"algorithm": "sha512",
+"filename": "sccache.tar.xz"
 }
 ]
--- a/browser/config/tooltool-manifests/linux64/releng.manifest
+++ b/browser/config/tooltool-manifests/linux64/releng.manifest
@@ -1,14 +1,20 @@
 [
 {
-"size": 40, 
-"digest": "459b332864aece4742cd1a6886e56cf3f202e5c27bb481cfae6145ce3e2e52fb34d1448788c6618e58a26a64e415341895326d293e0d2968e56efc0ae990acd0",
+"size": 81,
+"digest": "59002eae04fa3534df3bbb0026dff50d3872313551514f9ccdf33080c8b8e34a6295b3b6f2c078b3ddef099023897a42adb65d34c9364f84dac5b8e7d022bf39",
 "algorithm": "sha512", 
 "filename": "setup.sh"
 }, 
 {
 "size": 80458572,
 "digest": "e5101f9dee1e462f6cbd3897ea57eede41d23981825c7b20d91d23ab461875d54d3dfc24999aa58a31e8b01f49fb3140e05ffe5af2957ef1d1afb89fd0dfe1ad",
 "algorithm": "sha512", 
 "filename": "gcc.tar.xz"
+},
+{
+"size": 150816,
+"digest": "af25ecf03b65795d21f011939984b130db167a4efc4f306700f373854f9d7ae664662cb7812c3d737eace7f3735324daa6eb540b5e42f90189b0d9a8dd5f4c9f",
+"algorithm": "sha512",
+"filename": "sccache.tar.xz"
 }
 ]
new file mode 100644
--- /dev/null
+++ b/build/mozconfig.cache
@@ -0,0 +1,26 @@
+# 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
+
+bucket=
+if test -f "$topsrcdir/sccache/sccache.py"; then
+    case `hostname` in
+    try*spot*.use1.mozilla.com|try*ec2*.use1.mozilla.com)
+        bucket=mozilla-releng-s3-cache-us-east-1-try
+        ;;
+    try*spot*.usw2.mozilla.com|try*ec2*.usw2.mozilla.com)
+        bucket=mozilla-releng-s3-cache-us-west-2-try
+        ;;
+    esac
+fi
+
+if test -z "$bucket"; then
+    ac_add_options --with-ccache
+else
+    mk_add_options "export SCCACHE_BUCKET=$bucket"
+    mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253"
+    export CC="python2.7 $topsrcdir/sccache/sccache.py $CC"
+    export CXX="python2.7 $topsrcdir/sccache/sccache.py $CXX"
+fi
--- a/xulrunner/config/mozconfigs/linux32/xulrunner
+++ b/xulrunner/config/mozconfigs/linux32/xulrunner
@@ -2,11 +2,11 @@ export MOZILLA_OFFICIAL=1
 export JAVA_HOME=/tools/jdk
 
 ac_add_options --enable-application=xulrunner
 ac_add_options --disable-tests
 
 . $topsrcdir/build/unix/mozconfig.linux32
 
 #Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
+. "$topsrcdir/build/mozconfig.cache"
 
 . "$topsrcdir/xulrunner/config/mozconfigs/common.override"
--- a/xulrunner/config/mozconfigs/linux32/xulrunner-qt
+++ b/xulrunner/config/mozconfigs/linux32/xulrunner-qt
@@ -2,17 +2,17 @@ export MOZILLA_OFFICIAL=1
 export JAVA_HOME=/tools/jdk
 
 ac_add_options --enable-application=xulrunner
 ac_add_options --disable-tests
 
 . $topsrcdir/build/unix/mozconfig.linux32
 
 #Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
+. "$topsrcdir/build/mozconfig.cache"
 
 # QT Options
 export PKG_CONFIG_PATH=/tools/qt-4.6.3/qt/lib/pkgconfig
 ac_add_options --with-qtdir=/tools/qt-4.6.3/qt
 ac_add_options --enable-default-toolkit=cairo-qt
 ac_add_options --disable-crashreporter
 
 . "$topsrcdir/xulrunner/config/mozconfigs/common.override"
--- a/xulrunner/config/mozconfigs/linux64/xulrunner
+++ b/xulrunner/config/mozconfigs/linux64/xulrunner
@@ -2,11 +2,11 @@ export MOZILLA_OFFICIAL=1
 export JAVA_HOME=/tools/jdk
 
 ac_add_options --enable-application=xulrunner
 ac_add_options --disable-tests
 
 . $topsrcdir/build/unix/mozconfig.linux
 
 #Use ccache
-ac_add_options --with-ccache=/usr/bin/ccache
+. "$topsrcdir/build/mozconfig.cache"
 
 . "$topsrcdir/xulrunner/config/mozconfigs/common.override"