summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-05-01 20:37:46 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-05-09 11:03:15 +0200
commit689829db6a3628d2c7c09b8046c24cbae8c98d94 (patch)
tree93b71e1cdfb765957b88e03b858cd62b9601376b /configure.ac
parent7f992595a4f4bed38f67c2fa34ffafecb082753a (diff)
if ccache is enabled, by default also enable CCACHE_DEPEND
This avoids the preprocessing step normally done by ccache (see ccache docs), which speeds up the build. This way there may be incorrect ccache hits if a system header (found using -isystem) changes, but that should be rare and such headers generally should be backwards compatible, so the chance of an actual breakage should be very low. The patch also adds --enable-ccache=nodepend to allow enabling ccache without the depend mode. https://lists.freedesktop.org/archives/libreoffice/2019-May/082684.html Change-Id: Id69ca43988a016a917beb75927b39d8bde719aa7 Reviewed-on: https://gerrit.libreoffice.org/71629 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 13 insertions, 1 deletions
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]*//'])