summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-18 17:40:42 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-21 12:55:53 +0200
commit2fa1d68984e28a2c9d54250d16cecf6e719b4547 (patch)
treeed8dd0e1bef961fa1b9a6540f812d1c67b7a5913 /compilerplugins
parent06be436363f1b9d72a19aba7c1e6df3fcf6c7844 (diff)
Don't invoke the linker when generating pch files
When `llvm-config --cxxflags` outputs -Wl,... options (as has been discussed at 824d9394b529bb1fc521e4a4df8c4e3458ec5641 "Properly handle comma in CLANGFLAGS", and which end up on the compiler command lines here), Clang failed with an error "cannot specify -o when generating multiple output files" when generating sharedvisitor/clang.pch. Change-Id: I200ebd152f5a524ce7ecdd2f25c34bbaa634f515 Reviewed-on: https://gerrit.libreoffice.org/81065 Tested-by: Jenkins Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/Makefile-clang.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index 8e66b7e5b93c..0965c74636fc 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -326,7 +326,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) \
- -fPIC $< -o $@ -MMD -MT $@ -MP -MF $(CLANGOUTDIR)/clang.pch.d
+ -fPIC -c $< -o $@ -MMD -MT $@ -MP -MF $(CLANGOUTDIR)/clang.pch.d
endif
-include $(CLANGOUTDIR)/clang.pch.d
@@ -343,7 +343,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) $< -o $@ -MMD -MT $@ -MP \
+ $(COMPILER_PLUGINS_TOOLING_ARGS) -c $< -o $@ -MMD -MT $@ -MP \
-MF $(CLANGOUTDIR)/sharedvisitor/clang.pch.d
-include $(CLANGOUTDIR)/sharedvisitor/clang.pch.d