Skip to content

Commit 80b3693

Browse files
committed
more sqlite compile time options
1 parent c54c950 commit 80b3693

File tree

2 files changed

+92
-1
lines changed

2 files changed

+92
-1
lines changed

llama.cpp/embedfile/BUILD.mk

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,22 @@ o/$(MODE)/llama.cpp/embedfile/shell.a: o/$(MODE)/llama.cpp/embedfile/shell.o
3636

3737
#o/$(MODE)/llama.cpp/embedfile/embedfile.a: $(LLAMA_CPP_EMBEDFILE_OBJS)
3838

39-
#o/$(MODE)/llama.cpp/embedfile/sqlite3.o: private COPTS += -O3
39+
o/$(MODE)/llama.cpp/embedfile/sqlite3.o: private CFLAGS += \
40+
-DSQLITE_ENABLE_FTS5 \
41+
-DSQLITE_ENABLE_RTREE \
42+
-DSQLITE_SOUNDEX \
43+
-DSQLITE_ENABLE_GEOPOLY \
44+
-DSQLITE_ENABLE_MATH_FUNCTIONS \
45+
-USQLITE_ENABLE_FTS3 \
46+
-DSQLITE_ENABLE_FTS5 \
47+
-DSQLITE_ENABLE_DBSTAT_VTAB \
48+
-DSQLITE_ENABLE_DBPAGE_VTAB \
49+
-DSQLITE_ENABLE_STMTVTAB \
50+
-DSQLITE_ENABLE_BYTECODE_VTAB \
51+
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
52+
-DSQLITE_HAVE_ZLIB \
53+
-DSQLITE_INTROSPECTION_PRAGMAS \
54+
-DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
4055

4156
o/$(MODE)/llama.cpp/embedfile/embedfile: \
4257
o/$(MODE)/llama.cpp/embedfile/shell.a \

llama.cpp/embedfile/tests/__snapshots__/env.out

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,26 @@ select name from pragma_function_list order by name;
3636
│ '->>' │
3737
│ '_lembed_api' │
3838
│ 'abs' │
39+
│ 'acos' │
40+
│ 'acosh' │
41+
│ 'asin' │
42+
│ 'asinh' │
43+
│ 'atan' │
44+
│ 'atan2' │
45+
│ 'atanh' │
3946
│ 'avg' │
4047
│ 'base64' │
4148
│ 'base85' │
49+
│ 'bm25' │
50+
│ 'ceil' │
51+
│ 'ceiling' │
4252
│ 'changes' │
4353
│ 'char' │
4454
│ 'coalesce' │
4555
│ 'concat' │
4656
│ 'concat_ws' │
57+
│ 'cos' │
58+
│ 'cosh' │
4759
│ 'count' │
4860
│ 'count' │
4961
│ 'cume_dist' │
@@ -60,18 +72,39 @@ select name from pragma_function_list order by name;
6072
│ 'decimal_pow2' │
6173
│ 'decimal_sub' │
6274
│ 'decimal_sum' │
75+
│ 'degrees' │
6376
│ 'dense_rank' │
6477
│ 'dtostr' │
6578
│ 'dtostr' │
6679
│ 'edit' │
6780
│ 'edit' │
6881
│ 'embedfile_version' │
82+
│ 'exp' │
6983
│ 'first_value' │
84+
│ 'floor' │
7085
│ 'format' │
86+
│ 'fts5' │
87+
│ 'fts5_get_locale' │
88+
│ 'fts5_locale' │
89+
│ 'fts5_source_id' │
90+
│ 'geopoly_area' │
91+
│ 'geopoly_bbox' │
92+
│ 'geopoly_blob' │
93+
│ 'geopoly_ccw' │
94+
│ 'geopoly_contains_point' │
95+
│ 'geopoly_debug' │
96+
│ 'geopoly_group_bbox' │
97+
│ 'geopoly_json' │
98+
│ 'geopoly_overlap' │
99+
│ 'geopoly_regular' │
100+
│ 'geopoly_svg' │
101+
│ 'geopoly_within' │
102+
│ 'geopoly_xform' │
71103
│ 'glob' │
72104
│ 'group_concat' │
73105
│ 'group_concat' │
74106
│ 'hex' │
107+
│ 'highlight' │
75108
│ 'ieee754' │
76109
│ 'ieee754' │
77110
│ 'ieee754_exponent' │
@@ -141,8 +174,13 @@ select name from pragma_function_list order by name;
141174
│ 'likely' │
142175
│ 'lines_debug' │
143176
│ 'lines_version' │
177+
│ 'ln' │
144178
│ 'load_extension' │
145179
│ 'load_extension' │
180+
│ 'log' │
181+
│ 'log' │
182+
│ 'log10' │
183+
│ 'log2' │
146184
│ 'lower' │
147185
│ 'lsmode' │
148186
│ 'ltrim' │
@@ -153,6 +191,7 @@ select name from pragma_function_list order by name;
153191
│ 'median' │
154192
│ 'min' │
155193
│ 'min' │
194+
│ 'mod' │
156195
│ 'nth_value' │
157196
│ 'ntile' │
158197
│ 'nullif' │
@@ -161,8 +200,12 @@ select name from pragma_function_list order by name;
161200
│ 'percentile' │
162201
│ 'percentile_cont' │
163202
│ 'percentile_disc' │
203+
│ 'pi' │
204+
│ 'pow' │
205+
│ 'power' │
164206
│ 'printf' │
165207
│ 'quote' │
208+
│ 'radians' │
166209
│ 'random' │
167210
│ 'randomblob' │
168211
│ 'rank' │
@@ -173,6 +216,9 @@ select name from pragma_function_list order by name;
173216
│ 'round' │
174217
│ 'round' │
175218
│ 'row_number' │
219+
│ 'rtreecheck' │
220+
│ 'rtreedepth' │
221+
│ 'rtreenode' │
176222
│ 'rtrim' │
177223
│ 'rtrim' │
178224
│ 'sha1' │
@@ -188,11 +234,16 @@ select name from pragma_function_list order by name;
188234
│ 'shell_module_schema' │
189235
│ 'shell_putsnl' │
190236
│ 'sign' │
237+
│ 'sin' │
238+
│ 'sinh' │
239+
│ 'snippet' │
240+
│ 'soundex' │
191241
│ 'sqlite_compileoption_get' │
192242
│ 'sqlite_compileoption_used' │
193243
│ 'sqlite_log' │
194244
│ 'sqlite_source_id' │
195245
│ 'sqlite_version' │
246+
│ 'sqrt' │
196247
│ 'stmtrand' │
197248
│ 'stmtrand' │
198249
│ 'strftime' │
@@ -204,17 +255,21 @@ select name from pragma_function_list order by name;
204255
│ 'substring' │
205256
│ 'subtype' │
206257
│ 'sum' │
258+
│ 'tan' │
259+
│ 'tanh' │
207260
│ 'time' │
208261
│ 'timediff' │
209262
│ 'total' │
210263
│ 'total_changes' │
211264
│ 'trim' │
212265
│ 'trim' │
266+
│ 'trunc' │
213267
│ 'typeof' │
214268
│ 'unhex' │
215269
│ 'unhex' │
216270
│ 'unicode' │
217271
│ 'unixepoch' │
272+
│ 'unknown' │
218273
│ 'unlikely' │
219274
│ 'upper' │
220275
│ 'usleep' │
@@ -244,10 +299,15 @@ select name from pragma_module_list order by name;
244299
┌────────────────────────┐
245300
│ name │
246301
├────────────────────────┤
302+
│ 'bytecode' │
247303
│ 'completion' │
248304
│ 'csv' │
305+
│ 'dbstat' │
249306
│ 'fsdir' │
307+
│ 'fts5' │
308+
│ 'fts5vocab' │
250309
│ 'generate_series' │
310+
│ 'geopoly' │
251311
│ 'json_each' │
252312
│ 'json_tree' │
253313
│ 'lembed_batch' │
@@ -256,6 +316,11 @@ select name from pragma_module_list order by name;
256316
│ 'lines_read' │
257317
│ 'pragma_function_list' │
258318
│ 'pragma_module_list' │
319+
│ 'rtree' │
320+
│ 'rtree_i32' │
321+
│ 'sqlite_dbpage' │
322+
│ 'sqlite_stmt' │
323+
│ 'tables_used' │
259324
│ 'vec0' │
260325
│ 'vec_each' │
261326
└────────────────────────┘
@@ -280,6 +345,16 @@ select compile_options from pragma_compile_options order by 1;
280345
│ 'DEFAULT_WAL_SYNCHRONOUS=2' │
281346
│ 'DEFAULT_WORKER_THREADS=0' │
282347
│ 'DIRECT_OVERFLOW_READ' │
348+
│ 'ENABLE_BYTECODE_VTAB' │
349+
│ 'ENABLE_DBPAGE_VTAB' │
350+
│ 'ENABLE_DBSTAT_VTAB' │
351+
│ 'ENABLE_EXPLAIN_COMMENTS' │
352+
│ 'ENABLE_FTS5' │
353+
│ 'ENABLE_GEOPOLY' │
354+
│ 'ENABLE_MATH_FUNCTIONS' │
355+
│ 'ENABLE_RTREE' │
356+
│ 'ENABLE_STMTVTAB' │
357+
│ 'ENABLE_UNKNOWN_SQL_FUNCTION' │
283358
│ 'MALLOC_SOFT_LIMIT=1024' │
284359
│ 'MAX_ATTACHED=10' │
285360
│ 'MAX_COLUMN=2000' │
@@ -298,6 +373,7 @@ select compile_options from pragma_compile_options order by 1;
298373
│ 'MAX_VDBE_OP=250000000' │
299374
│ 'MAX_WORKER_THREADS=8' │
300375
│ 'MUTEX_PTHREADS' │
376+
│ 'SOUNDEX' │
301377
│ 'SYSTEM_MALLOC' │
302378
│ 'TEMP_STORE=1' │
303379
│ 'THREADSAFE=1' │

0 commit comments

Comments
 (0)