diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-09-16 23:16:05 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-09-17 09:30:41 +0200 |
commit | 8083ccef3759b2d838df86965c0d1b42f9098848 (patch) | |
tree | ca15dda0d2a3a9f666a45e40a198957f0f6625df /compilerplugins | |
parent | c56bf1479cc71d1a2b0639f6383e90c1f7e3655b (diff) |
Fix compilerplugins for macOS again
...in the same spirit as how COMPILER_PLUGINS_TOOLING_ARGS had been introduced
with ad7e2af4ed0c11f8571374fbb40d38b38c27959c "Allow to pass additional options
into generator's clang::tooling": For one,
ceb26770b3d1c5c2ffaf73f8f589c5e169e6db06 "split clangplugins sharedvisitor
generator into two steps" should have passed COMPILER_PLUGINS_TOOLING_ARGS only
into the analyzer and not into the generator executable, while for another, at
least my local build failed with
> [PCH] compilerplugins/clang/sharedvisitor/clang.pch
> In file included from /Users/stephan/Software/lo/core/compilerplugins/clang/sharedvisitor/precompiled_clang.hxx:12:
> In file included from /Users/stephan/Software/lo/core/compilerplugins/clang/sharedvisitor/../plugin.hxx:15:
> In file included from /Users/stephan/Software/llvm/inst/include/clang/AST/ASTContext.h:18:
> In file included from /Users/stephan/Software/llvm/inst/include/clang/AST/ASTTypeTraits.h:19:
> In file included from /Users/stephan/Software/llvm/inst/include/clang/AST/Decl.h:16:
> In file included from /Users/stephan/Software/llvm/inst/include/clang/AST/APValue.h:16:
> In file included from /Users/stephan/Software/llvm/inst/include/clang/Basic/FixedPoint.h:19:
> In file included from /Users/stephan/Software/llvm/inst/include/llvm/ADT/APSInt.h:17:
> In file included from /Users/stephan/Software/llvm/inst/include/llvm/ADT/APInt.h:18:
> In file included from /Users/stephan/Software/llvm/inst/include/llvm/Support/Compiler.h:21:
> In file included from /Users/stephan/Software/llvm/inst/bin/../include/c++/v1/new:90:
> In file included from /Users/stephan/Software/llvm/inst/bin/../include/c++/v1/exception:81:
> In file included from /Users/stephan/Software/llvm/inst/bin/../include/c++/v1/cstdlib:85:
> /Users/stephan/Software/llvm/inst/bin/../include/c++/v1/stdlib.h:97:15: fatal error: 'stdlib.h' file not found
> #include_next <stdlib.h>
> ^~~~~~~~~~
after dc79dc76f18148296ae18ed7251cf61505e25d44 "make clangplugin analyzer use internally a PCH to speed things up".
Change-Id: I4aa925049dbc145c672cad7cab2043a0f13780fa
Reviewed-on: https://gerrit.libreoffice.org/79028
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/Makefile-clang.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk index f2ed9212948d..ac23edf6cb2b 100644 --- a/compilerplugins/Makefile-clang.mk +++ b/compilerplugins/Makefile-clang.mk @@ -229,7 +229,7 @@ $(CLANGOUTDIR)/sharedvisitor/%.plugininfo: $(CLANGINDIR)/%.cxx \ $(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx: $(SHARED_SOURCE_INFOS) $(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT) $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,1) $(QUIET)$(ICECREAM_RUN) $(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT) \ - $(COMPILER_PLUGINS_TOOLING_ARGS:%=-arg=%) $(SHARED_SOURCE_INFOS) > $@ + $(SHARED_SOURCE_INFOS) > $@ CLANGTOOLLIBS = -lclangTooling -lclangDriver -lclangFrontend -lclangParse -lclangSema -lclangEdit -lclangAnalysis \ -lclangAST -lclangLex -lclangSerialization -lclangBasic $(shell $(LLVMCONFIG) --ldflags --libs --system-libs) @@ -287,7 +287,8 @@ $(CLANGOUTDIR)/sharedvisitor/clang.pch: $(CLANGINDIR)/sharedvisitor/precompiled_ $(CLANGOUTDIR)/clang-timestamp \ | $(CLANGOUTDIR)/sharedvisitor $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),PCH,1) - $(QUIET)$(CLANGDIR)/bin/clang -x c++-header $(LO_CLANG_ANALYZER_PCH_CXXFLAGS) $< -o $@ + $(QUIET)$(CLANGDIR)/bin/clang -x c++-header $(LO_CLANG_ANALYZER_PCH_CXXFLAGS) \ + $(COMPILER_PLUGINS_TOOLING_ARGS) $< -o $@ else $(CLANGOUTDIR)/sharedvisitor/clang.pch: touch $@ |