-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add build-time option to statically link to clap_entry #263
Conversation
Allows for avoiding having to dlopen()/LoadLibrary() on itself to find 'clap_entry'. Instead it can be done at link-time. Useful if you are linking the clap-wrapper files to your clap plugin. This way, we avoid the potential point-of-failure and slowness of doing library loading and filesystem access.
@defiantnerd I mentioned on discord that this looks fine to me. Any objections? If not lets push it into next. |
I don't know, if this is really necessary - the OTOH it adds another option to complexity. I am not convinced. |
So the primary reason is the clap entry as an exported symbol needs to be compiled into each DLL since you can’t have a DLL link another, if you want single file standalone the way we solved this in conduit etc is we have the members of clap entry be statics and then link and multiply compile a file with the actual entry into each property this aims to make it so you gave an alternate approach where clap entry is a static and you don’t need to export it at the edge |
ok - convinced. |
Thank you for the merge
Does this code not |
You can call
(see https://man.openbsd.org/dlopen.3) So, as far as I understand it, the |
Ah interesting! Yes that makes sense then because the host would have had to I still appreciate the static build option that was merged. I love removing (even unlikely) possible points of failure if the complexity cost isn't too high |
Yes, I haven't had the static linking to an actual executable in mind - this makes it necessary anyway. |
Allows for avoiding having to dlopen()/LoadLibrary() on itself to find
'clap_entry'. Instead it can be done at link-time.
Useful if you are linking the clap-wrapper files to your clap plugin.
This way, we avoid the potential point-of-failure and slowness of doing
library loading and filesystem access.
Let me know if I'm missing anything. And I might need assistance regarding how this integrates with the cmake. I don't the cmake system for my projects.