[Libreoffice-commits] core.git: solenv/gbuild
Collabora (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 23 08:31:40 UTC 2021
solenv/gbuild/platform/com_GCC_class.mk | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 6192fca42aec2db25f6dade632fd0e50eded5d0e
Author: Collabora <l.lunak at collabora.com>
AuthorDate: Thu Jul 15 12:18:04 2021 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Fri Jul 23 10:31:06 2021 +0200
workaround for apple clang sometimes not generating PCH
Change-Id: I50a215e0cf3bf7f6f6d6dc86cf89355e2de19c11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119009
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index c29e2a979fd9..9407488c5c4d 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -95,10 +95,14 @@ endef
ifeq ($(COM_IS_CLANG),TRUE)
gb_PrecompiledHeader_get_enableflags = -include-pch $(call gb_PrecompiledHeader_get_target,$(1),$(2))
gb_PrecompiledHeader_EXT := .pch
+# Workaround: Apple Clang version 12.0.5 sometimes tries to compile instead of generating PCH
+# when used just with -c c++-header, so help it by being explicit.
+gb_PrecompiledHeader_emit_pch := -Xclang -emit-pch
else
gb_PrecompiledHeader_get_enableflags = \
-include $(dir $(call gb_PrecompiledHeader_get_target,$(1),$(2)))$(notdir $(subst .gch,,$(call gb_PrecompiledHeader_get_target,$(1),$(2))))
gb_PrecompiledHeader_EXT := .gch
+gb_PrecompiledHeader_emit_pch :=
endif
gb_PrecompiledHeader_extra_pch_cxxflags += $(PCH_INSTANTIATE_TEMPLATES)
@@ -133,7 +137,7 @@ $(call gb_Helper_abbreviate_dirs,\
cd $(BUILDDIR)/ && \
CCACHE_DISABLE=1 $(gb_COMPILER_SETUP) \
$(if $(8),$(8),$(gb_CXX)) \
- -x c++-header \
+ -x c++-header $(gb_PrecompiledHeader_emit_pch) \
$(4) \
$(if $(7), $(call gb_CObject__filter_out_clang_cflags,$(5)),$(5)) \
$(if $(WARNINGS_DISABLED),$(gb_CXXFLAGS_DISABLE_WARNINGS)) \
More information about the Libreoffice-commits
mailing list