Search code examples
csqlitecompiler-options

Small build of amalgamated SQLite3 source


I'd like to use the compiler options described here to generate a smaller SQLite3 library. However, these options (including -Os it seems) expressly don't work with the amalgamated source, which is my preference. (I even tried all the same and indeed it won't work.)

Is there a good alternative to generating a smaller SQLite3 library that doesn't involve going through sqlite3.c and checking the dependencies?


Solution

  • Download the Sqlite3 sources from their Fossil source control system for a particular version, which will give the unprocessed source, before amalgamation. You can then run make sqlite3.c to create the amalgamation on your own -- and naturally, you can change the command line arguments to omit features you don't need. Full details are on the SQLite build instructions page. Certain Sqlite features are actually required to create the amalgamation; a non-amalgamated build can omit more.