[llvm] [Opt] Enable statically-linked plugin support (PR #79227)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 10:34:41 PST 2024


aeubanks wrote:

if this is just to be used in non-core tools, I'd prefer a `llvm::Registry` approach (basically the global variable approach @efriedma-quic mentioned), like how clang extensions work (e.g. [here](https://github.com/llvm/llvm-project/blob/eb678d89933684627ee2c5da47e53751f3fdbaa2/clang/examples/AnnotateFunctions/AnnotateFunctions.cpp#L84)). then around [here](https://github.com/llvm/llvm-project/blob/849951f8759171cb6c74d3ccbcf154506fc1f0ae/llvm/tools/opt/NewPMDriver.cpp#L433) we can invoke all of those

that seems much simpler than this PR + https://github.com/llvm/llvm-project/pull/79205

https://github.com/llvm/llvm-project/pull/79227


More information about the llvm-commits mailing list