[llvm] [Opt] Enable statically-linked plugin support (PR #79227)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 16:57:24 PST 2024
efriedma-quic wrote:
Rename main() to OptDriverMain(), add a new file opt-executable.cpp that's a wrapper around it. Add whatever parameters you need to OptDriverMain().
Alternatively, adding a global variable to opt.cpp isn't that terrible. We want to avoid global variables in core libraries so we don't have issues with shared state, but I wouldn't expect opt-driver to be used in that sort of context.
https://github.com/llvm/llvm-project/pull/79227
More information about the llvm-commits
mailing list