(optionally) build internal sqlite3 library with -ffunction-sections
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.
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.
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.