summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-07-20 17:29:17 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2016-07-21 23:29:17 +0000
commitbeccfd1f8d87ae2196815d5a760054312e8e1c38 (patch)
tree14b5ad15fedcc5a8e5f7a67ef2068b5772cdc285 /solenv
parentad3f7d1bd65a3ac6295a50171488cef6ebfb0a73 (diff)
gbuild: always set CCACHE_CPP2=1 when COM_IS_CLANG
There are not only spurious warnings from loplugin, but also from plain clang, at least with the Fedora 24 version. So let's just try to always set CCACHE_CPP2=1. This should make the configure check for that obsolete. The check didn't do anything on Fedora anyway because it sets up ccache by putting wrappers like /usr/lib64/ccache/clang on PATH. Change-Id: Ieb17be4a1b1fd0f7aedb16b18cb49015917a26d3 Reviewed-on: https://gerrit.libreoffice.org/27345 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/com_GCC_class.mk1
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk6
2 files changed, 5 insertions, 2 deletions
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 8c32795f2db9..4d0378bec617 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -46,6 +46,7 @@ endef
define gb_CObject__command_pattern
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) $(dir $(4)) && cd $(SRCDIR) && \
+ $(gb_COMPILER_SETUP) \
$(if $(5),$(gb_COMPILER_PLUGINS_SETUP)) \
$(if $(filter %.c %.m,$(3)), $(gb_CC), $(gb_CXX)) \
$(DEFS) \
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 8f26cbf8b81a..10f9a4726176 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -218,11 +218,13 @@ ifneq ($(UPDATE_FILES),)
gb_COMPILER_PLUGINS += -Xclang -plugin-arg-loplugin -Xclang --scope=$(UPDATE_FILES)
endif
endif
-# extra EF variable to make the command line shorter (just like is done with $(SRCDIR) etc.)
-gb_COMPILER_PLUGINS_SETUP := EF=$(SRCDIR)/include/sal/log-areas.dox && ICECC_EXTRAFILES=$$EF CCACHE_EXTRAFILES=$$EF CCACHE_CPP2=1
+# set CCACHE_CPP2=1 to prevent clang generating spurious warnings
+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
else
+gb_COMPILER_SETUP :=
gb_COMPILER_PLUGINS :=
gb_COMPILER_PLUGINS_SETUP :=
gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS :=