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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to