Add tests for the new code on this branch.
[sqlite.git] / tool / symbols.sh
blob67d578e1f110bcfdb23f7efb36f436842a28440e
1 #!/bin/sh
3 # Run this script in a directory that contains a valid SQLite makefile in
4 # order to verify that unintentionally exported symbols.
6 make sqlite3.c
8 echo '****** Exported symbols from a build including RTREE, FTS4 & FTS5 ******'
9 gcc -c -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE \
10 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \
11 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \
12 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \
13 -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_SESSION \
14 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY \
15 sqlite3.c
16 nm sqlite3.o | grep ' [TD] ' | sort -k 3
18 echo '****** Surplus symbols from a build including RTREE, FTS4 & FTS5 ******'
19 nm sqlite3.o | grep ' [TD] ' |
20 egrep -v ' .*sqlite3(session|rebaser|changeset|changegroup)?_'
22 echo '****** Dependencies of the core. No extensions. No OS interface *******'
23 gcc -c -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \
24 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \
25 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \
26 -DSQLITE_OS_OTHER -DSQLITE_THREADSAFE=0 \
27 sqlite3.c
28 nm sqlite3.o | grep ' U ' | sort -k 3
30 echo '****** Dependencies including RTREE & FTS4 *******'
31 gcc -c -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE \
32 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \
33 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \
34 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \
35 sqlite3.c
36 nm sqlite3.o | grep ' U ' | sort -k 3