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:
parent
7c20248a20
commit
e3f56ecb01
|
@ -39,7 +39,8 @@ XBPS_SUCMD="sudo /bin/sh -c"
|
||||||
|
|
||||||
# [OPTIONAL]
|
# [OPTIONAL]
|
||||||
# Enable or disable ccache when building packages. The ccache directory
|
# 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
|
#XBPS_CCACHE=yes
|
||||||
|
|
||||||
|
|
4
xbps-src
4
xbps-src
|
@ -621,6 +621,10 @@ else
|
||||||
export CCACHE_COMPILERCHECK=content CCACHE_COMPRESS=1
|
export CCACHE_COMPILERCHECK=content CCACHE_COMPRESS=1
|
||||||
export PATH="$CCACHEPATH:$PATH"
|
export PATH="$CCACHEPATH:$PATH"
|
||||||
mkdir -p $CCACHE_DIR
|
mkdir -p $CCACHE_DIR
|
||||||
|
|
||||||
|
export GOCACHE="${XBPS_HOSTDIR}/gocache"
|
||||||
|
else
|
||||||
|
export GOCACHE=off
|
||||||
fi
|
fi
|
||||||
if [ -n "$XBPS_DISTCC" ]; then
|
if [ -n "$XBPS_DISTCC" ]; then
|
||||||
if [ -n "$XBPS_CCACHE" ]; then
|
if [ -n "$XBPS_CCACHE" ]; then
|
||||||
|
|
Loading…
Reference in New Issue