[PATCH] D116966: [analyzer] Don't specify PLUGIN_TOOL for analyzer plugins

Aleksandr Platonov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 21 11:12:27 PST 2022


ArcsinX added a comment.

In D116966#3261479 <https://reviews.llvm.org/D116966#3261479>, @beanz wrote:

> Have you looked at the impact on binary size? PLUGIN_TOOL _should_ cause the plugins to link against the copy of LLVM & Clang in the tool target binary which reduces the binary size of the plugin and avoids duplicate global initializations.

To see this difference we need to build this plugin with and without `PLUGIN_TOOL` (and  with `-DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=On`)
But with `PLUGIN_TOOL` and `-DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=On` SampleAnalyzerPlugin can't be built using MSVC because of libraries conflict: we link DLL agains clang tool and also link libraries which this tool already contains (clangAnalysis,  clangAST,  clangStaticAnalyzerCore,  clangStaticAnalyzerFrontend). You can check build log in the description.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116966/new/

https://reviews.llvm.org/D116966



More information about the cfe-commits mailing list