summaryrefslogtreecommitdiff
path: root/solenv/gbuild/platform/com_GCC_class.mk
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-07-05 21:52:56 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-07-06 10:09:03 +0200
commitb2d42856062236249f283ea7ec7336efa3a7a182 (patch)
treed99659d1eb1fd0977f43e29ae9ddf52c0f505584 /solenv/gbuild/platform/com_GCC_class.mk
parent68cd8a97510ccfccb98516539ddb4affc94d46fa (diff)
build Clang PCH always with the same working dir
It seems Clang saves current working directory in the PCH, so if the PCH is once built during 'make' and other time during 'make -C sc', then those two PCHs are binary different (but functionally equivalent), leading to ccache misses. Change-Id: I406c0ff5f31b4433168dfef363e778361027a852 Reviewed-on: https://gerrit.libreoffice.org/75146 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'solenv/gbuild/platform/com_GCC_class.mk')
-rw-r--r--solenv/gbuild/platform/com_GCC_class.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 5ae811ad81c7..18170c8eae2d 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -94,6 +94,7 @@ define gb_PrecompiledHeader__command
$(call gb_Output_announce,$(2),$(true),PCH,1)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2),$(7))) && \
+ cd $(BUILDDIR)/ && \
CCACHE_DISABLE=1 $(gb_COMPILER_SETUP) \
$(gb_CXX) \
-x c++-header \