summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@pefoley.com>2016-01-16 16:01:39 -0500
committerMichael Stahl <mstahl@redhat.com>2016-01-21 22:35:55 +0000
commitd86a3ae100c5a9ad2895baec9a564e570a0a7d93 (patch)
tree769548f6b26172760ea65920d0ac0b15a312a82f /solenv/gbuild
parent8c63bdc873fe549ea8d58ec2e31a95b309158f5a (diff)
Make ccache work properly with GCC PCH
Change-Id: I2cbf3fc3ba2df7131ce9328de8bada701ecb3b65 Reviewed-on: https://gerrit.libreoffice.org/21524 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 877f5021c73f..ef7dbea0cf76 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -112,6 +112,13 @@ gb_CXXFLAGS_COMMON += -fstack-protector-strong
gb_LinkTarget_LDFLAGS += -fstack-protector-strong
endif
+ifeq ($(ENABLE_PCH),TRUE)
+ifneq ($(COM_IS_CLANG),TRUE)
+gb_CFLAGS_COMMON += -fpch-preprocess
+gb_CXXFLAGS_COMMON += -fpch-preprocess
+endif
+endif
+
gb_CFLAGS_WERROR := $(if $(ENABLE_WERROR),-Werror)
# This is the default in non-C++11 mode