labath wrote:

Okay, that sort of makes sense. However, unless you actually want to be able to 
disable each of these plugins independently (which it sounds like you don't), 
then this is a very.. baroque way to achieve the desired effect (to have 
multiple (plugin) classes registered with the plugin manager).

All of that cmake plugin logic is just a very elaborate way to invoke 
`SomeClass::Initialize()`. Plugins are registered through 
`PluginManager::RegisterPlugin`. While the usual case is that the `Initialize` 
function performs a single `RegisterPlugin` call (and pretty much nothing 
else), nothing actually depends or enforces that, and we do have "plugins" 
where a single plugin library registers more than plugin class (e.g. 
`lldbPluginPlatformMacOSX`). I think it would be perfectly reasonable to 
register all of these classes from 
`ScriptInterpreterPythonInterfaces::Initialize` (and maybe even from 
`ScriptInterpreterPython::Initialize`).

https://github.com/llvm/llvm-project/pull/101672
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to