For the record, I know that the documentation says the OMIT_* flags don't
work with the regular amalgamation, but I have in fact used many of them and
they seem to work. Two that only partially worked (a bug?) are
SQLITE_OMIT_AUTOVACUUM and SQLITE_OMIT_AUTHORIZATION (I am not sure about
that second one, as I am writing this from memory. I think it was that one)
They gave a warning when compiling sqlite3.c and an error when linking it to
my program.

On Mon, Jul 25, 2011 at 6:16 PM, Dave Hope <[email protected]> wrote:

> Hi Richard,
>
> I'm using gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5). Also tried with
> VC9 which yields very similar sizes.
>
> $ gcc main.c sqlite3.c -lpthread -ldl
> $ size a.out
>   text    data     bss     dec     hex filename
>  514475    3688    1168  519331   7eca3 a.out
>
> It looks like this could have been because I wasn't optimizing for size:
>
> $ gcc main.c sqlite3.c -lpthread -ldl -Os
> $ size a.out
>   text    data     bss     dec     hex filename
>  326487    3588    1000  331075   50d43 a.out
>
> Thanks for pointing out what I missed,
>
> Dave
>
> On Mon, Jul 25, 2011 at 4:07 PM, Richard Hipp <[email protected]> wrote:
> > On Mon, Jul 25, 2011 at 10:39 AM, Dave Hope <[email protected]> wrote:
> >
> >> Hi all,
> >>
> >> I read on the sqlite website that the compiled size can be reduced to
> >> 275KiB ( http://www.sqlite.org/different.html#small ), however I'm
> >> struggling to get it much below 500 KiB using the SQLITE_OMIT_*
> >> options. I'm producing my own amalgamation, which I believe you can
> >> use the OMIT options with:
> >>
> >
> > So I type:
> >
> >    gcc -Os -c sqlite3.c; size sqlite3.o
> >
> > And on Linux with gcc 4.1.0 I get 333802 bytes.  This is without any OMIT
> > options.  And you cannot get it below 500KB?  What compiler are you
> using?
> >
> >
> > --
> > D. Richard Hipp
> > [email protected]
> > _______________________________________________
> > sqlite-users mailing list
> > [email protected]
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to