xbps-src: support caching go builds

Piggyback on the existing XBPS_CCACHE logic to enable/disable. Stored in
${XBPS_HOSTDIR}/gocache.
This commit is contained in:
Michael Gehring 2018-03-09 11:42:48 +00:00 committed by Enno Boland
parent 7c20248a20
commit e3f56ecb01
2 changed files with 6 additions and 1 deletions

View File

@ -39,7 +39,8 @@ XBPS_SUCMD="sudo /bin/sh -c"
# [OPTIONAL]
# Enable or disable ccache when building packages. The ccache directory
# is stored in the hostdir, i.e hostdir/ccache.
# is stored in the hostdir, i.e hostdir/ccache. For go builds this enables
# caching in hostdir/gocache.
#
#XBPS_CCACHE=yes

View File

@ -621,6 +621,10 @@ else
export CCACHE_COMPILERCHECK=content CCACHE_COMPRESS=1
export PATH="$CCACHEPATH:$PATH"
mkdir -p $CCACHE_DIR
export GOCACHE="${XBPS_HOSTDIR}/gocache"
else
export GOCACHE=off
fi
if [ -n "$XBPS_DISTCC" ]; then
if [ -n "$XBPS_CCACHE" ]; then