summaryrefslogtreecommitdiff
path: root/libsqlite3/libsqlite3/buildfile
diff options
context:
space:
mode:
Diffstat (limited to 'libsqlite3/libsqlite3/buildfile')
-rw-r--r--libsqlite3/libsqlite3/buildfile71
1 files changed, 51 insertions, 20 deletions
diff --git a/libsqlite3/libsqlite3/buildfile b/libsqlite3/libsqlite3/buildfile
index d8c2913..0b52040 100644
--- a/libsqlite3/libsqlite3/buildfile
+++ b/libsqlite3/libsqlite3/buildfile
@@ -8,7 +8,8 @@ tclass = $c.target.class
bsd = ($tclass == 'bsd')
windows = ($tclass == 'windows')
-gcc = ($c.class == 'gcc')
+gcc = ($c.class == 'gcc')
+clang_msvc = ($c.id == 'clang' && $c.target.system == 'win32-msvc')
# Build options.
#
@@ -16,33 +17,58 @@ gcc = ($c.class == 'gcc')
# the official documentation.
#
# Note that we "prefix" them to what might have been specified by the user so
-# that it is possible to override the defaults by specifying them as =0 (it's
-# also the reason we use cc.* instead of c.*, the former comes first).
+# that it is possible to override the defaults by specifying them as =0.
#
-# PREUPDATE_HOOK is required by SESSION
+# PREUPDATE_HOOK is required by SESSION.
#
-# -DSQLITE_ENABLE_SESSION=1 removed for now due to bug in 3.18.0.
+# GEOPOLY (alternative interface to the R-Tree extension) is always enabled by
+# upstream together with RTREE.
+#
+# ROWID_IN_VIEW restores some legacy behavior.
#
# Note that if disabling any previously-released features, then will need to
# increment abi_major.
#
-cc.poptions =+ \
--DSQLITE_THREADSAFE=1 \
--DSQLITE_ENABLE_FTS4=1 \
--DSQLITE_ENABLE_FTS5=1 \
--DSQLITE_ENABLE_RTREE=1 \
--DSQLITE_ENABLE_JSON1=1 \
--DSQLITE_SECURE_DELETE=1 \
--DSQLITE_ENABLE_DBSTAT_VTAB=1 \
--DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
--DSQLITE_ENABLE_LOAD_EXTENSION=1 \
--DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
--DSQLITE_ENABLE_COLUMN_METADATA=1 \
--DSQLITE_ENABLE_FTS3_PARENTHESIS=1
+c.poptions =+ \
+ -DSQLITE_ALLOW_ROWID_IN_VIEW=1 \
+ -DSQLITE_ENABLE_COLUMN_METADATA=1 \
+ -DSQLITE_ENABLE_DBPAGE_VTAB=1 \
+ -DSQLITE_ENABLE_DBSTAT_VTAB=1 \
+ -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1 \
+ -DSQLITE_ENABLE_FTS3=1 \
+ -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 \
+ -DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
+ -DSQLITE_ENABLE_FTS4=1 \
+ -DSQLITE_ENABLE_FTS5=1 \
+ -DSQLITE_ENABLE_GEOPOLY=1 \
+ -DSQLITE_ENABLE_JSON1=1 \
+ -DSQLITE_ENABLE_LOAD_EXTENSION=1 \
+ -DSQLITE_ENABLE_MATH_FUNCTIONS=1 \
+ -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
+ -DSQLITE_ENABLE_RTREE=1 \
+ -DSQLITE_ENABLE_SESSION=1 \
+ -DSQLITE_ENABLE_STMTVTAB=1 \
+ -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
+ -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \
+ -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
+ -DSQLITE_MAX_SCHEMA_RETRY=25 \
+ -DSQLITE_MAX_VARIABLE_NUMBER=250000 \
+ -DSQLITE_OMIT_LOOKASIDE=1 \
+ -DSQLITE_SECURE_DELETE=1 \
+ -DSQLITE_SOUNDEX=1 \
+ -DSQLITE_THREADSAFE=1 \
+ -DSQLITE_USE_URI=1
+
+# Raise the maximum number of attached databases from 10 up to the limit.
+#
+c.poptions =+ -DSQLITE_MAX_ATTACHED=125
if! $windows
{
- cc.poptions =+ -DHAVE_USLEEP=1
+ # Note that the upstream package normally defines a number of other HAVE_*
+ # macros, which we currently don't care about.
+ #
+ c.poptions =+ -DHAVE_USLEEP=1
# SQLITE_THREADSAFE requres -lpthread
# SQLITE_ENABLE_LOAD_EXTENSION requires -ldl
@@ -58,7 +84,9 @@ if! $windows
# We also assume these are implementation dependencies (so there is no
# c.export.libs listing them).
#
- c.libs += -lpthread -lm
+ # Note that we use -pthread instead of -lpthread for efficiency.
+ #
+ c.libs += -pthread -lm
if! $bsd
c.libs += -ldl
@@ -69,6 +97,9 @@ if! $windows
if $gcc
c.coptions += -fno-strict-aliasing
+if $clang_msvc
+ c.coptions += -Wno-deprecated-declarations
+
# Disable warnings that pop up with -Wextra. Upstream doesn't seem to care
# about these and it is not easy to disable specific warnings in a way that
# works across compilers/version (some -Wno-* options are only recognized in