diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-05-01 19:57:39 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-05-09 11:02:52 +0200 |
commit | 7f992595a4f4bed38f67c2fa34ffafecb082753a (patch) | |
tree | d83b8dcba1460282363e06bd5b2bc7055a8814ff /solenv | |
parent | 18bda6827521fae6916f55be73cb1b68bb39a6c5 (diff) |
simply set ccache env.vars instead of just warning about them
So that it works out of the box automagically.
Change-Id: I0a6c93824233eef6ce25c44762ec40770ec5110f
Reviewed-on: https://gerrit.libreoffice.org/71628
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 5d5c69ddeb9c..88d1613574d8 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -35,6 +35,9 @@ else gb_AR := $(shell $(CC) -print-prog-name=ar) endif +# shell setup (env.vars) for the compiler +gb_COMPILER_SETUP := + ifneq ($(USE_LD),) gb_LinkTarget_LDFLAGS += -fuse-ld=$(USE_LD) endif @@ -234,7 +237,7 @@ ifeq ($(COMPILER_PLUGINS_DEBUG),TRUE) gb_COMPILER_PLUGINS += -Xclang -plugin-arg-loplugin -Xclang --debug endif # set CCACHE_CPP2=1 to prevent clang generating spurious warnings -gb_COMPILER_SETUP := CCACHE_CPP2=1 +gb_COMPILER_SETUP += CCACHE_CPP2=1 gb_COMPILER_PLUGINS_SETUP := ICECC_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox CCACHE_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS := \ -Xclang -plugin-arg-loplugin -Xclang --warnings-as-errors @@ -242,9 +245,7 @@ else # Set CCACHE_CPP2 to prevent GCC -Werror=implicit-fallthrough= when ccache strips comments from C # code (which still needs /*fallthrough*/-style comments to silence that warning): ifeq ($(ENABLE_WERROR),TRUE) -gb_COMPILER_SETUP := CCACHE_CPP2=1 -else -gb_COMPILER_SETUP := +gb_COMPILER_SETUP += CCACHE_CPP2=1 endif gb_COMPILER_TEST_FLAGS := gb_COMPILER_PLUGINS := @@ -286,4 +287,19 @@ endef gb_Helper_get_rcfile = $(1)rc +ifneq ($(ENABLE_PCH),) +# Enable use of .sum files for PCHs. +gb_COMPILER_SETUP += CCACHE_PCH_EXTSUM=1 +# CCACHE_SLOPPINESS should contain pch_defines,time_macros for PCHs. +gb_CCACHE_SLOPPINESS := +ifeq ($(shell test -z "$$CCACHE_SLOPPINESS" && echo 1),1) +gb_CCACHE_SLOPPINESS := CCACHE_SLOPPINESS=pch_defines,time_macros +else +ifeq ($(shell echo "$$CCACHE_SLOPPINESS" | grep -q pch_defines | grep -q time_macros && echo 1),1) +gb_CCACHE_SLOPPINESS := CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS:pch_defines,time_macros +endif +endif +gb_COMPILER_SETUP += $(gb_CCACHE_SLOPPINESS) +endif + # vim: set noet sw=4: |