summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac14
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk4
3 files changed, 18 insertions, 1 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index 84c75e5e5954..90bb4e37c891 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -58,6 +58,7 @@ export BZIP2_LIBS=$(gb_SPACE)@BZIP2_LIBS@
export CAIRO_CFLAGS=$(gb_SPACE)@CAIRO_CFLAGS@
export CAIRO_LIBS=$(gb_SPACE)@CAIRO_LIBS@
export CC=@CC@
+export CCACHE_DEPEND_MODE=@CCACHE_DEPEND_MODE@
export CDR_CFLAGS=$(gb_SPACE)@CDR_CFLAGS@
export CDR_LIBS=$(gb_SPACE)@CDR_LIBS@
@x_CFLAGS@ export CFLAGS=@CFLAGS@
diff --git a/configure.ac b/configure.ac
index 6a7e7b4734d8..3a2b3c4c1b12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1370,6 +1370,8 @@ AC_ARG_ENABLE(ccache,
By default, unless on Windows, we will try to detect if ccache is available; in that case if
CC/CXX are not yet set, and --enable-icecream is not given, we
attempt to use ccache. --disable-ccache disables ccache completely.
+ Additionally ccache's depend mode is enabled if possible,
+ use --enable-ccache=nodepend to enable ccache without depend mode.
]),
,)
@@ -2573,21 +2575,26 @@ AC_SUBST(WITH_GALLERY_BUILD)
dnl ===================================================================
dnl Checks if ccache is available
dnl ===================================================================
+CCACHE_DEPEND_MODE=
if test "$_os" = "WINNT"; then
# on windows/VC build do not use ccache
CCACHE=""
-elif test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
+elif test "$enable_ccache" = "no"; then
+ CCACHE=""
+elif test -n "$enable_ccache" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
case "%$CC%$CXX%" in
# If $CC and/or $CXX already contain "ccache" (possibly suffixed with some version number etc),
# assume that's good then
*%ccache[[-_' ']]*|*/ccache[[-_' ']]*)
AC_MSG_NOTICE([ccache seems to be included in a pre-defined CC and/or CXX])
+ CCACHE_DEPEND_MODE=1
;;
*)
AC_PATH_PROG([CCACHE],[ccache],[not found])
if test "$CCACHE" = "not found"; then
CCACHE=""
else
+ CCACHE_DEPEND_MODE=1
# Need to check for ccache version: otherwise prevents
# caching of the results (like "-x objective-c++" for Mac)
if test $_os = Darwin -o $_os = iOS; then
@@ -2600,6 +2607,7 @@ elif test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecr
else
AC_MSG_RESULT([no, $CCACHE_VERSION])
CCACHE=""
+ CCACHE_DEPEND_MODE=
fi
fi
fi
@@ -2608,6 +2616,10 @@ elif test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecr
else
CCACHE=""
fi
+if test "$enable_ccache" = "nodepend"; then
+ CCACHE_DEPEND_MODE=""
+fi
+AC_SUBST(CCACHE_DEPEND_MODE)
if test "$CCACHE" != ""; then
ccache_size_msg=$([ccache -s | tail -n 1 | sed 's/^[^0-9]*//' | sed -e 's/\.[0-9]*//'])
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 88d1613574d8..e0862b7fedca 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -302,4 +302,8 @@ endif
gb_COMPILER_SETUP += $(gb_CCACHE_SLOPPINESS)
endif
+ifneq ($(CCACHE_DEPEND_MODE),)
+gb_COMPILER_SETUP += CCACHE_DEPEND=1
+endif
+
# vim: set noet sw=4: