-
Notifications
You must be signed in to change notification settings - Fork 39
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
Build shared library #193
base: master
Are you sure you want to change the base?
Build shared library #193
Conversation
Is it beneficial to building a template heavy library like this as a shared library? Pretty much every symbol that is going to be used is going in the dependent binary rather than the shared library. |
I am trying to package all dependencies required for DCD for fedora.
I can make both a static one and a shared one, that would help the package review |
I'm only seeing one function in the library that would be distributed in a static library: https://github.com/dlang-community/containers/blob/master/src/containers/internal/hash.d#L45 It could be templated and then this should be fully a source library, no need to distribute it as a shared library. |
ok thanks I will try to provides the package with only a static library. |
You misunderstand me, you don't need to distribute a built version (assuming everything gets templated that isn't already) at all. |
Maybe I misunderstand, so I will try to develop the consequence as I understand:
thanks for your insight |
Almost all of the code in this library is templated. When you build this library as a static library, there will be almost nothing in that binary, because no templates were initialized to go into it. When you use it, you initialize templates and therefore they go into your binary. Templates get compiled and initialized every time you use them. There is simply nothing to distribute if every declaration is templated. |
Dear,
current meson build have to be updated in order to generate .so file