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

(optionally) build internal sqlite3 library with -ffunction-sections #294

Open
smichaku opened this issue Aug 23, 2020 · 2 comments
Open
Assignees

Comments

@smichaku
Copy link

SQLiteCPP uses the SQLite amalgamation source when building with SQLITECPP_INTERNAL_SQLITE=ON. This puts all the library's code in a single section which is linked as a dependency with SQLiteCPP. Compiling the amalgamation source with -ffunction-sections will put each function in a section and allow the linker to throw away unused sections making the final binary size smaller.

@SRombauts SRombauts self-assigned this Aug 23, 2020
@SRombauts
Copy link
Owner

Hello,

Nice idea indeed! Would you be able to provide a pull request for it?
It could actually even be the default if it make sense/doesn't have too many drawbacks.

@smichaku
Copy link
Author

Pull request was submitted. I must say I did not get the chance to test this change thoroughly at my end yet... It does look harmless for my usage but it might be worthwhile to consider the impact in the general use case.

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

No branches or pull requests

2 participants