@@ -71,6 +71,8 @@ PRINT_USAGE() {
71
71
echo " Disable FEATUREs from JSRT experimental features."
72
72
echo " --valgrind Enable Valgrind support"
73
73
echo " !!! Disables Concurrent GC (lower performance)"
74
+ echo " --ccache[=NAME] Enable ccache, optionally with a custom binary name."
75
+ echo " Default: ccache"
74
76
echo " -v, --verbose Display verbose output including all options"
75
77
echo " --wb-check CPPFILE"
76
78
echo " Write-barrier check given CPPFILE (git path)"
@@ -124,6 +126,7 @@ VALGRIND=0
124
126
CMAKE_EXPORT_COMPILE_COMMANDS=" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
125
127
LIBS_ONLY_BUILD=
126
128
ALWAYS_YES=
129
+ CCACHE_NAME=
127
130
PYTHON2_BINARY=$( which python2.7 || which python2 || which python 2> /dev/null)
128
131
129
132
UNAME_S=` uname -s`
@@ -336,6 +339,16 @@ while [[ $# -gt 0 ]]; do
336
339
TARGET_PATH=${TARGET_PATH: 14}
337
340
;;
338
341
342
+ --ccache=* )
343
+ CCACHE_NAME=" $1 "
344
+ CCACHE_NAME=${CCACHE_NAME: 9}
345
+ CCACHE_NAME=" -DCCACHE_PROGRAM_NAME_SH=${CCACHE_NAME} "
346
+ ;;
347
+
348
+ --ccache)
349
+ CCACHE_NAME=" -DCCACHE_PROGRAM_NAME_SH=ccache"
350
+ ;;
351
+
339
352
--without=* )
340
353
FEATURES=$1
341
354
FEATURES=${FEATURES: 10} # value after --without=
@@ -655,7 +668,7 @@ echo $EXTRA_DEFINES
655
668
cmake $CMAKE_GEN $CC_PREFIX $CMAKE_ICU $LTO $LTTNG $STATIC_LIBRARY $ARCH $TARGET_OS \
656
669
$ENABLE_CC_XPLAT_TRACE $EXTRA_DEFINES -DCMAKE_BUILD_TYPE=$BUILD_TYPE $SANITIZE $NO_JIT $CMAKE_INTL \
657
670
$WITHOUT_FEATURES $WB_FLAG $WB_ARGS $CMAKE_EXPORT_COMPILE_COMMANDS $LIBS_ONLY_BUILD \
658
- $VALGRIND $BUILD_RELATIVE_DIRECTORY
671
+ $VALGRIND $BUILD_RELATIVE_DIRECTORY $CCACHE_NAME
659
672
660
673
_RET=$?
661
674
if [[ $? == 0 ]]; then
0 commit comments