symbols-mingw.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. #
  3. # Run this script in a directory that contains a valid SQLite makefile in
  4. # order to verify that unintentionally exported symbols.
  5. #
  6. make sqlite3.c
  7. echo '****** Exported symbols from a build including RTREE && FTS4 ******'
  8. gcc -c -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE \
  9. -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \
  10. -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \
  11. -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \
  12. sqlite3.c
  13. nm sqlite3.o | grep " [TD] "
  14. echo '****** Surplus symbols from a build including RTREE & FTS4 ******'
  15. nm sqlite3.o | grep " [TD] " | grep -v " .*sqlite3_"
  16. echo '****** Dependencies of the core. No extensions. No OS interface *******'
  17. gcc -c -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \
  18. -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \
  19. -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \
  20. -DSQLITE_OS_OTHER -DSQLITE_THREADSAFE=0 \
  21. sqlite3.c
  22. nm sqlite3.o | grep " U "
  23. echo '****** Dependencies including RTREE & FTS4 *******'
  24. gcc -c -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE \
  25. -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \
  26. -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \
  27. -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \
  28. sqlite3.c
  29. nm sqlite3.o | grep " U "