[PATCH] D75879: [lld][WIP]Enabling loading LLVM pass plugins

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 13 02:15:36 PDT 2020


jhenderson added inline comments.


================
Comment at: lld/tools/lld/CMakeLists.txt:11
   )
+export_executable_symbols(lld)
 
----------------
efriedma wrote:
> MaskRay wrote:
> > Does this CMake function enable -rdynamic (the same as -Wl,--export-dynamic)? It can make the executable much larger because all defined symbols in .symtab will end up in .dynsym and consume a lot of .dynstr space...
> Yes.  We have to expose all the LLVM symbols so that the plugin can use them (the plugin has to be using the same LLVM as lld itself).  We do the same thing in clang.
> 
> I guess we could add a CMake option to disable this, if you want a minimal config that doesn't support pass plugins.  Not sure how likely it is anyone would use such an option.
We have a policy whereby users are not allowed to inject their own custom passes into the compilation or link. The latter is currently impossible at the moment, and we'd like to keep it that way internally at least. If there is a compile-time option when building LLD to disable the plugin behaviour, it would be much appreciated by us. I don't think it matters too much from our point of view if it is off or on by default though, though we'd obviously prefer off.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75879





More information about the llvm-commits mailing list