[PATCH] D62445: [test] Fix plugin tests

David Zarzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 23:30:27 PDT 2019


davezarzycki added a comment.

In D62445#1616218 <https://reviews.llvm.org/D62445#1616218>, @davezarzycki wrote:

> Just FYI – Having LLVM_ENABLE_PLUGINS_default depend on LLVM_ENABLE_PIC is a hack that should go away someday. Doing so requires that plugin dependencies either always build PIC (and therefore ignore LLVM_ENABLE_PIC), or are linked into the executables that load them and the plugin knows how to find them in the executable. In the case of the latter and on Mach-O platforms, this requires passing `-bundle_loader $PATH_TO_EXECUTABLE` to the linker when creating the plugin (a.k.a. "bundle"), but on ELF platforms, I'm not sure what needs to be done.


It just occurred to me: option 3 is to statically link the plugins if PIC is disabled.

These are all just tradeoffs of course, and the worst among them is what we have today: conflating "enable plugins" with the default PIC behavior for the project.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62445





More information about the llvm-commits mailing list