Skip to content
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

Support to build as shared library #245

Open
topazus opened this issue Dec 16, 2023 · 3 comments
Open

Support to build as shared library #245

topazus opened this issue Dec 16, 2023 · 3 comments

Comments

@topazus
Copy link

topazus commented Dec 16, 2023

No description provided.

@MBkkt
Copy link
Member

MBkkt commented Dec 16, 2023

Is it make sense?

@topazus
Copy link
Author

topazus commented Dec 16, 2023

Yes, I think it is proper to support to build shared or static library. The CMake variable BUILD_SHARED_LIBS can be used as the option to choose to build shared or static. Also, set soversion when building as shared library is also suggested, which can help to indicate the ABI/API change.

Ref:
https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html
https://cmake.org/cmake/help/latest/prop_tgt/SOVERSION.html
simdjson/simdjson#52

@MBkkt
Copy link
Member

MBkkt commented Dec 16, 2023

I don't think we have stable ABI.

In general library is really tiny and it doesn't feel like shared library is good option for it.

Also with dynamic linking it's impossible to rely on lto.
We rely on lto to decrease compile time and move more code out of headers file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants