diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-11-25 12:06:38 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-11-25 21:57:13 +0100 |
commit | 62625aa76bb840c8663452383abe506d6ce4faa4 (patch) | |
tree | ed5b482cf26f62c961bbc17b110d90886f0be546 /compilerplugins | |
parent | 4652572a7682e63298b36e6de309310449f25e75 (diff) |
use -Xclang -fno-pch-timestamp also for Clang PCH in compilerplugins
We already use that normally, the build system should generally take
care of this by gmake dependencies. One exception is system headers,
but those usually do not really change even if their timestamps do,
so this should prevent Clang from giving an error about this after
system headers update (which should be harmless, and if it isn't
then I suppose either something else such as compiler upgrade
should trigger a rebuild, or cleaning needs to be done manually).
Change-Id: I60581c0d2d3233aadc60e1c90bd62cb9ad684ba2
Reviewed-on: https://gerrit.libreoffice.org/83662
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/Makefile-clang.mk | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk index 0965c74636fc..29bc89c6b2a2 100644 --- a/compilerplugins/Makefile-clang.mk +++ b/compilerplugins/Makefile-clang.mk @@ -112,6 +112,7 @@ ifneq ($(OS),WNT) # Currently only Clang PCH is supported (which should usually be the case, as Clang is usually self-built). ifneq ($(findstring clang,$(COMPILER_PLUGINS_CXX)),) LO_CLANG_USE_PCH=1 +LO_CLANG_PCH_FLAGS:=-Xclang -fno-pch-timestamp endif endif endif @@ -326,6 +327,7 @@ $(CLANGOUTDIR)/clang.pch: $(CLANGINDIR)/precompiled_clang.hxx \ $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),PCH,1) $(QUIET)$(COMPILER_PLUGINS_CXX) -x c++-header $(CLANGDEFS) $(CLANGCXXFLAGS) $(CLANGWERROR) \ $(CLANGINCLUDES) -I$(BUILDDIR)/config_host -I$(CLANGINDIR) -DPCH_LEVEL=$(gb_ENABLE_PCH) \ + $(LO_CLANG_PCH_FLAGS) \ -fPIC -c $< -o $@ -MMD -MT $@ -MP -MF $(CLANGOUTDIR)/clang.pch.d endif -include $(CLANGOUTDIR)/clang.pch.d @@ -343,7 +345,7 @@ $(CLANGOUTDIR)/sharedvisitor/clang.pch: $(CLANGINDIR)/sharedvisitor/precompiled_ | $(CLANGOUTDIR)/sharedvisitor $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),PCH,1) $(QUIET)$(CLANGDIR)/bin/clang -x c++-header $(LO_CLANG_ANALYZER_PCH_CXXFLAGS) \ - $(COMPILER_PLUGINS_TOOLING_ARGS) -c $< -o $@ -MMD -MT $@ -MP \ + $(LO_CLANG_PCH_FLAGS) $(COMPILER_PLUGINS_TOOLING_ARGS) -c $< -o $@ -MMD -MT $@ -MP \ -MF $(CLANGOUTDIR)/sharedvisitor/clang.pch.d -include $(CLANGOUTDIR)/sharedvisitor/clang.pch.d |