Bug 1382502 - Include mozconfig.cache in most cases. r?ted
We want most builds to be actually using sccache, so we include
mozconfig.cache from mozconfig.common. However, since the --with-ccache
configure option doesn't exist on non-compile jobs (e.g. artifact
builds), we move to using the CCACHE environment variable instead, which
allows us to unset it in mozconfig.no-compile.
And since mozconfig.no-compile is always included where no_sccache is
set, we can remove that variable.
--- a/browser/config/mozconfigs/linux32/debug
+++ b/browser/config/mozconfigs/linux32/debug
@@ -15,9 +15,8 @@ export MOZ_TELEMETRY_REPORTING=1
#Use ccache
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/linux32/devedition
+++ b/browser/config/mozconfigs/linux32/devedition
@@ -15,9 +15,8 @@ ac_add_options --enable-verify-mar
# by 2 MBs.
STRIP_FLAGS="--strip-debug"
ac_add_options --with-branding=browser/branding/aurora
mk_add_options MOZ_PGO=1
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/linux32/l10n-mozconfig
+++ b/browser/config/mozconfigs/linux32/l10n-mozconfig
@@ -1,10 +1,8 @@
-no_sccache=1
-
ac_add_options --with-l10n-base=../../l10n
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.no-compile"
if test `uname -m` = "x86_64"; then
ac_add_options --target=i686-pc-linux
--- a/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition
+++ b/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition
@@ -1,10 +1,8 @@
-no_sccache=1
-
ac_add_options --with-l10n-base=../../l10n
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
ac_add_options --with-branding=browser/branding/aurora
. "$topsrcdir/build/mozconfig.no-compile"
if test `uname -m` = "x86_64"; then
ac_add_options --target=i686-pc-linux
--- a/browser/config/mozconfigs/linux32/nightly
+++ b/browser/config/mozconfigs/linux32/nightly
@@ -6,9 +6,8 @@ ac_add_options --enable-verify-mar
# 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"
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/linux64/debug
+++ b/browser/config/mozconfigs/linux64/debug
@@ -15,9 +15,8 @@ export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/linux64/debug-static-analysis-clang
+++ b/browser/config/mozconfigs/linux64/debug-static-analysis-clang
@@ -19,9 +19,8 @@ export CXX="$topsrcdir/clang/bin/clang++
ac_add_options --enable-clang-plugin
. "$topsrcdir/build/unix/mozconfig.stdcxx"
export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
. $topsrcdir/build/unix/mozconfig.gtk
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/linux64/devedition
+++ b/browser/config/mozconfigs/linux64/devedition
@@ -15,9 +15,8 @@ ac_add_options --enable-verify-mar
# by 2 MBs.
STRIP_FLAGS="--strip-debug"
ac_add_options --with-branding=browser/branding/aurora
mk_add_options MOZ_PGO=1
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/linux64/l10n-mozconfig
+++ b/browser/config/mozconfigs/linux64/l10n-mozconfig
@@ -1,10 +1,8 @@
-no_sccache=1
-
ac_add_options --with-l10n-base=../../l10n
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.no-compile"
export MOZILLA_OFFICIAL=1
--- a/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition
+++ b/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition
@@ -1,10 +1,8 @@
-no_sccache=1
-
ac_add_options --with-l10n-base=../../l10n
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
ac_add_options --with-branding=browser/branding/aurora
. "$topsrcdir/build/mozconfig.no-compile"
export MOZILLA_OFFICIAL=1
--- a/browser/config/mozconfigs/linux64/nightly
+++ b/browser/config/mozconfigs/linux64/nightly
@@ -6,9 +6,8 @@ ac_add_options --enable-verify-mar
# 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"
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/linux64/opt-static-analysis-clang
+++ b/browser/config/mozconfigs/linux64/opt-static-analysis-clang
@@ -18,9 +18,8 @@ CXX="$topsrcdir/clang/bin/clang++"
ac_add_options --enable-clang-plugin
. "$topsrcdir/build/unix/mozconfig.stdcxx"
export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
. $topsrcdir/build/unix/mozconfig.gtk
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/macosx64/beta
+++ b/browser/config/mozconfigs/macosx64/beta
@@ -4,9 +4,8 @@ if [ -n "$ENABLE_RELEASE_PROMOTION" ]; t
fi
. "$topsrcdir/browser/config/mozconfigs/macosx64/common-opt"
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/macosx64/debug
+++ b/browser/config/mozconfigs/macosx64/debug
@@ -15,9 +15,8 @@ ac_add_options --with-macbundlename-pref
fi
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/macosx64/debug-static-analysis
+++ b/browser/config/mozconfigs/macosx64/debug-static-analysis
@@ -5,9 +5,8 @@ MOZ_AUTOMATION_L10N_CHECK=0
. $topsrcdir/build/macosx/mozconfig.common
ac_add_options --enable-debug
ac_add_options --enable-dmd
ac_add_options --enable-clang-plugin
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/macosx64/devedition
+++ b/browser/config/mozconfigs/macosx64/devedition
@@ -20,9 +20,8 @@ fi
if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
ac_add_options --with-macbundlename-prefix=Firefox
fi
ac_add_options --with-branding=browser/branding/aurora
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/macosx64/nightly
+++ b/browser/config/mozconfigs/macosx64/nightly
@@ -12,9 +12,8 @@ fi
if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
ac_add_options --with-macbundlename-prefix=Firefox
fi
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/macosx64/opt-static-analysis
+++ b/browser/config/mozconfigs/macosx64/opt-static-analysis
@@ -6,10 +6,9 @@ MOZ_AUTOMATION_L10N_CHECK=0
ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --enable-dmd
ac_add_options --enable-clang-plugin
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/macosx64/release
+++ b/browser/config/mozconfigs/macosx64/release
@@ -11,9 +11,8 @@ fi
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
# safeguard against someone forgetting to re-set EARLY_BETA_OR_EARLIER in
# defines.sh during the beta cycle
export BUILDING_RELEASE=1
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/whitelist
+++ b/browser/config/mozconfigs/whitelist
@@ -21,56 +21,51 @@ for platform in ['linux32', 'linux64', '
]
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"',
]
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"',
]
whitelist['nightly']['macosx64'] += [
'if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then',
'ac_add_options --with-macbundlename-prefix=Firefox',
'fi',
'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',
'if test `uname -s` != Linux; then',
]
whitelist['nightly']['win32'] += [
'. $topsrcdir/configs/mozilla2/win32/include/choose-make-flags',
'mk_add_options MOZ_MAKE_FLAGS=-j1',
- '. "$topsrcdir/build/mozconfig.cache"',
'if test "$IS_NIGHTLY" != ""; then',
'ac_add_options --disable-auto-deps',
'fi',
]
whitelist['nightly']['win64'] += [
'. "$topsrcdir/browser/config/mozconfigs/win64/common-win64"',
- '. "$topsrcdir/build/mozconfig.cache"',
]
for platform in all_platforms:
whitelist['release'][platform] = [
'ac_add_options --enable-update-channel=release',
'ac_add_options --enable-official-branding',
'mk_add_options MOZ_MAKE_FLAGS="-j4"',
'export BUILDING_RELEASE=1',
--- a/browser/config/mozconfigs/win32/debug
+++ b/browser/config/mozconfigs/win32/debug
@@ -18,9 +18,8 @@ export MOZ_TELEMETRY_REPORTING=1
. $topsrcdir/build/win32/mozconfig.vs-latest
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/win32/devedition
+++ b/browser/config/mozconfigs/win32/devedition
@@ -11,9 +11,8 @@ MOZ_REQUIRE_SIGNING=0
ac_add_options --enable-verify-mar
ac_add_options --with-branding=browser/branding/aurora
mk_add_options MOZ_PGO=1
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/win32/nightly
+++ b/browser/config/mozconfigs/win32/nightly
@@ -2,9 +2,8 @@
. "$topsrcdir/browser/config/mozconfigs/win32/common-opt"
ac_add_options --enable-profiling
ac_add_options --enable-verify-mar
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/win64/debug
+++ b/browser/config/mozconfigs/win64/debug
@@ -21,9 +21,8 @@ export MOZ_TELEMETRY_REPORTING=1
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly
. $topsrcdir/build/win64/mozconfig.vs-latest
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/win64/devedition
+++ b/browser/config/mozconfigs/win64/devedition
@@ -12,9 +12,8 @@ MOZ_REQUIRE_SIGNING=0
ac_add_options --enable-verify-mar
ac_add_options --with-branding=browser/branding/aurora
mk_add_options MOZ_PGO=1
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/win64/nightly
+++ b/browser/config/mozconfigs/win64/nightly
@@ -3,9 +3,8 @@
. "$topsrcdir/browser/config/mozconfigs/win64/common-opt"
ac_add_options --enable-profiling
ac_add_options --enable-verify-mar
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
--- a/build/mozconfig.cache
+++ b/build/mozconfig.cache
@@ -9,17 +9,17 @@ if test -z "$bucket" -a -z "$NO_CACHE";
# buildbot (or builders that use buildprops.json):
if [ -f $topsrcdir/../buildprops.json ]; then
read branch platform master <<EOF
$(python2.7 -c 'import json; p = json.loads(open("'"$topsrcdir"'/../buildprops.json").read())["properties"]; print p["branch"], p["platform"], p["master"]' 2> /dev/null)
EOF
bucket=
-if test -z "$SCCACHE_DISABLE" -a -z "$no_sccache" -a -z "$MOZ_PGO_IS_SET" -a -z "$MOZ_PGO"; then
+if test -z "$SCCACHE_DISABLE" -a -z "$MOZ_PGO_IS_SET" -a -z "$MOZ_PGO"; then
case "${branch}" in
try)
case "${master}" in
*scl1.mozilla.com*|*.scl3.mozilla.com*)
bucket=mozilla-releng-s3-cache-us-west-1-try
;;
*use1.mozilla.com*)
bucket=mozilla-releng-s3-cache-us-east-1-try
@@ -39,17 +39,17 @@ if test -z "$SCCACHE_DISABLE" -a -z "$no
;;
esac
;;
esac
fi
fi
# builds where buildprops didn't have the data (eg: taskcluster or non-buildbot) and without sccache disabled:
-if test -z "$bucket" -a -z "$SCCACHE_DISABLE" -a -z "$no_sccache" -a -z "$MOZ_PGO_IS_SET" -a -z "$MOZ_PGO"; then
+if test -z "$bucket" -a -z "$SCCACHE_DISABLE" -a -z "$MOZ_PGO_IS_SET" -a -z "$MOZ_PGO"; then
# prevent rerun if az is set, or wget is not available
if test -z "$availability_zone" -a -x "$(command -v wget)"; then
if test -n "${TASKCLUSTER_WORKER_GROUP}"; then
# TASKCLUSTER_WORKER_GROUP is just the region now, so
# stick an extra character on to make the already-convoluted logic
# here simpler.
availability_zone="${TASKCLUSTER_WORKER_GROUP}x"
@@ -103,26 +103,26 @@ if test -z "$platform"; then
;;
esac
fi
if test -z "$bucket"; then
case "$platform" in
win*) : ;;
*)
- ac_add_options --with-ccache
+ export CCACHE=ccache
esac
else
mk_add_options "export SCCACHE_BUCKET=$bucket"
case "$master" in
*us[ew][12].mozilla.com*|*euc1.mozilla.com*)
mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253"
;;
esac
- ac_add_options "--with-ccache=$topsrcdir/sccache2/sccache${suffix}"
+ export CCACHE="$topsrcdir/sccache2/sccache${suffix}"
export SCCACHE_VERBOSE_STATS=1
mk_add_options MOZ_PREFLIGHT_ALL+=build/sccache.mk
mk_add_options MOZ_POSTFLIGHT_ALL+=build/sccache.mk
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
--- a/build/mozconfig.common
+++ b/build/mozconfig.common
@@ -18,8 +18,9 @@ ac_add_options --enable-crashreporter
MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-1}
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}
ac_add_options --enable-js-shell
. "$topsrcdir/build/mozconfig.automation"
. "$topsrcdir/build/mozconfig.rust"
+. "$topsrcdir/build/mozconfig.cache"
--- a/build/mozconfig.no-compile
+++ b/build/mozconfig.no-compile
@@ -1,10 +1,15 @@
ac_add_options --disable-compile-environment
+# In case mozconfig.cache was already included
+unset CCACHE
+# In case it wasn't
+NO_CACHE=1
+
# Override any toolchain defines we've inherited from other mozconfigs.
unset CC
unset CXX
unset HOST_CC
unset HOST_CXX
unset RUSTC
unset CARGO
unset MAKECAB
--- a/mobile/android/config/mozconfigs/common
+++ b/mobile/android/config/mozconfigs/common
@@ -78,17 +78,16 @@ else
fi
export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=/builds/crash-stats-api.token
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
# Use ccache
-. "$topsrcdir/build/mozconfig.cache"
HOST_CC="$topsrcdir/gcc/bin/gcc"
HOST_CXX="$topsrcdir/gcc/bin/g++"
. "$topsrcdir/build/unix/mozconfig.stdcxx"
# Use libc++ as our C++ standard library
ac_add_options --with-android-cxx-stl=libc++
--- a/mobile/android/config/mozconfigs/common.override
+++ b/mobile/android/config/mozconfigs/common.override
@@ -3,9 +3,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This file is included at the bottom of all native android mozconfigs
#
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_SIGNING=0
. "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"