Add a _noccache option to enforce turning off ccache.
In addition, disable `CONFIG_GCC_PLUGINS` when ccache is used as it's disruptive, and tweak ccache sloppiness with safe values. Those changes combined are giving us near 100% cache hit rate on hot cache.
This commit is contained in:
@@ -262,6 +262,9 @@ prepare() {
|
||||
sed -i -e 's/CONFIG_LZ4_COMPRESS=m/CONFIG_LZ4_COMPRESS=y/' ./.config
|
||||
sed -i -e 's/CONFIG_LZ4HC_COMPRESS=m/CONFIG_LZ4HC_COMPRESS=y/' ./.config
|
||||
sed -i -e 's/CONFIG_RCU_BOOST_DELAY=500/CONFIG_RCU_BOOST_DELAY=0/' ./.config
|
||||
if [ "$_noccache" != "true" ] && pacman -Qq ccache &> /dev/null; then
|
||||
sed -i -e 's/CONFIG_GCC_PLUGINS=y/# CONFIG_GCC_PLUGINS is not set/' ./.config
|
||||
fi
|
||||
|
||||
# Inject cpuopts options
|
||||
echo "# CONFIG_MK8SSE3 is not set" >> ./.config
|
||||
@@ -844,8 +847,10 @@ build() {
|
||||
fi
|
||||
|
||||
# ccache
|
||||
if pacman -Qq ccache &> /dev/null; then
|
||||
if [ "$_noccache" != "true" ] && pacman -Qq ccache &> /dev/null; then
|
||||
export PATH="/usr/lib/ccache/bin/:$PATH"
|
||||
export CCACHE_SLOPPINESS="file_macro,locale,time_macros"
|
||||
export CCACHE_NOHASHDIR="true"
|
||||
msg2 'ccache was found and will be used'
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user