Skip to content

Commit 021274d

Browse files
committed
bazel/sqlite3: use minimal copts matching the omnibus baseline
The initial implementation used go-sqlite3's bundled-amalgamation compile flags (FTS3, R-tree, UPDATE/DELETE LIMIT, WAL synchronous, trace size limit) on the assumption that they were required for ABI compatibility. Auditing the actual go-sqlite3 consumers (MacPorts, Podman, go-rpmdb) shows none of them exercise those extensions; all queries are simple SELECTs against regular tables. The full feature set added ~879 KiB to the package unnecessarily. Keep only what the omnibus build already compiled with (MATH_FUNCTIONS, THREADSAFE=1) plus SQLITE_OMIT_DEPRECATED, which go-sqlite3 includes in its own bundled build so it never calls the removed APIs. The heroku / non-heroku select() is dropped as both flavors now share the same minimal set.
1 parent 498b863 commit 021274d

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

deps/sqlite3.BUILD.bazel

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,11 @@ cc_library(
2727
srcs = ["sqlite3.c"],
2828
hdrs = _SQLITE3_PUBLIC_HEADERS,
2929
includes = ["."],
30-
# SQLITE_* defines mirror mattn/go-sqlite3's bundled-amalgamation build
31-
# (sqlite3.go:13-23) so this shared library is feature-equivalent to the
32-
# binding's default flavor.
3330
copts = [
3431
"-Wall",
35-
"-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1",
36-
"-DSQLITE_ENABLE_FTS3",
37-
"-DSQLITE_ENABLE_FTS3_PARENTHESIS",
3832
"-DSQLITE_ENABLE_MATH_FUNCTIONS",
39-
"-DSQLITE_ENABLE_RTREE",
40-
"-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT",
4133
"-DSQLITE_OMIT_DEPRECATED",
4234
"-DSQLITE_THREADSAFE=1",
43-
"-DSQLITE_TRACE_SIZE_LIMIT=15",
4435
"-O2",
4536
],
4637
linkstatic = True,

0 commit comments

Comments
 (0)