Skip to content

Commit

Permalink
Bug 1382502 - Include mozconfig.cache in most cases. r=ted
Browse files Browse the repository at this point in the history
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.

--HG--
extra : rebase_source : a8c743de1fd7a3c0fbc53f7c233df36585897767
  • Loading branch information
glandium committed Jul 20, 2017
1 parent ef12240 commit f751ce9
Show file tree
Hide file tree
Showing 31 changed files with 10 additions and 40 deletions.
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux32/debug
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux32/devedition
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ ac_add_options --with-branding=browser/branding/aurora
mk_add_options MOZ_PGO=1

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
2 changes: 0 additions & 2 deletions browser/config/mozconfigs/linux32/l10n-mozconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
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
Expand Down
2 changes: 0 additions & 2 deletions browser/config/mozconfigs/linux32/l10n-mozconfig-devedition
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
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
Expand Down
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux32/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ STRIP_FLAGS="--strip-debug"
ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux64/debug
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
. $topsrcdir/build/unix/mozconfig.gtk

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux64/devedition
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ ac_add_options --with-branding=browser/branding/aurora
mk_add_options MOZ_PGO=1

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
2 changes: 0 additions & 2 deletions browser/config/mozconfigs/linux64/l10n-mozconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
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
Expand Down
2 changes: 0 additions & 2 deletions browser/config/mozconfigs/linux64/l10n-mozconfig-devedition
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
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
Expand Down
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux64/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ STRIP_FLAGS="--strip-debug"
ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
. $topsrcdir/build/unix/mozconfig.gtk

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx64/beta
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx64/debug
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx64/debug-static-analysis
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ ac_add_options --enable-dmd
ac_add_options --enable-clang-plugin

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx64/devedition
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ fi
ac_add_options --with-branding=browser/branding/aurora

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx64/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ fi
ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx64/opt-static-analysis
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ ac_add_options --enable-dmd
ac_add_options --enable-clang-plugin

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"

1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx64/release
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ ac_add_options --enable-verify-mar
export BUILDING_RELEASE=1

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
5 changes: 0 additions & 5 deletions browser/config/mozconfigs/whitelist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ whitelist['nightly']['linux32'] += [
'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'",
Expand All @@ -39,7 +38,6 @@ whitelist['nightly']['linux64'] += [
"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'] += [
Expand All @@ -48,7 +46,6 @@ whitelist['nightly']['macosx64'] += [
'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',
Expand All @@ -58,14 +55,12 @@ whitelist['nightly']['macosx64'] += [
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:
Expand Down
1 change: 0 additions & 1 deletion browser/config/mozconfigs/win32/debug
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/win32/devedition
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ ac_add_options --with-branding=browser/branding/aurora
mk_add_options MOZ_PGO=1

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/win32/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ ac_add_options --enable-verify-mar
ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/win64/debug
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ ac_add_options --with-branding=browser/branding/nightly
. $topsrcdir/build/win64/mozconfig.vs-latest

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/win64/devedition
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ ac_add_options --with-branding=browser/branding/aurora
mk_add_options MOZ_PGO=1

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/win64/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ ac_add_options --enable-verify-mar
ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
8 changes: 4 additions & 4 deletions build/mozconfig.cache
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $(python2.7 -c 'import json; p = json.loads(open("'"$topsrcdir"'/../buildprops.j
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
Expand Down Expand Up @@ -44,7 +44,7 @@ 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
Expand Down Expand Up @@ -108,7 +108,7 @@ 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"
Expand All @@ -117,7 +117,7 @@ else
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
Expand Down
1 change: 1 addition & 0 deletions build/mozconfig.common
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ ac_add_options --enable-js-shell

. "$topsrcdir/build/mozconfig.automation"
. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.cache"
5 changes: 5 additions & 0 deletions build/mozconfig.no-compile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
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
Expand Down
1 change: 0 additions & 1 deletion mobile/android/config/mozconfigs/common
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=/builds/crash-stats-api.token
export MOZ_PACKAGE_JSSHELL=1

# Use ccache
. "$topsrcdir/build/mozconfig.cache"

HOST_CC="$topsrcdir/gcc/bin/gcc"
HOST_CXX="$topsrcdir/gcc/bin/g++"
Expand Down
1 change: 0 additions & 1 deletion mobile/android/config/mozconfigs/common.override
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
MOZ_REQUIRE_SIGNING=0

. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"

0 comments on commit f751ce9

Please sign in to comment.