aboutsummaryrefslogtreecommitdiff
path: root/autosetup/sqlite-config.tcl
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2025-03-31 13:08:29 +0000
committerstephan <stephan@noemail.net>2025-03-31 13:08:29 +0000
commit0a0367f38740284b7f423ddc98b66361f3ddccf4 (patch)
treecc1e71fcfc01e8efc673ea39ced2ffc50a90a48f /autosetup/sqlite-config.tcl
parent227df626e95e8e122bdd2c94fd099b05df32b0e8 (diff)
downloadsqlite-0a0367f38740284b7f423ddc98b66361f3ddccf4.tar.gz
sqlite-0a0367f38740284b7f423ddc98b66361f3ddccf4.zip
Ensure that the compilation of extensions get the same CFLAGS as the core lib. Move the feature flags enabled by --dev out of TARGET_DEBUG and into OPT_FEATURE_FLAGS (for consistency). Rename the make-internal gcov-related flags to be more descriptive. At the end of the configure script, if SQLITE_DEBUG is active then emit a note reminding the builder that performance will suffer.
FossilOrigin-Name: e64c6a3856b839e4e8c0a1cb1713b0d2f1d3cb9b915dd215b0d3cb229502d539
Diffstat (limited to 'autosetup/sqlite-config.tcl')
-rw-r--r--autosetup/sqlite-config.tcl13
1 files changed, 9 insertions, 4 deletions
diff --git a/autosetup/sqlite-config.tcl b/autosetup/sqlite-config.tcl
index e6998a47e..eda9f2588 100644
--- a/autosetup/sqlite-config.tcl
+++ b/autosetup/sqlite-config.tcl
@@ -525,7 +525,8 @@ define OPT_SHELL {} ; # Feature-related CFLAGS for the sqlite3 CLI app
# Adds $args, if not empty, to OPT_FEATURE_FLAGS. If the first arg is
# -shell then it strips that arg and passes the remaining args the
# sqlite-add-shell-opt in addition to adding them to
-# OPT_FEATURE_FLAGS.
+# OPT_FEATURE_FLAGS. This is intended only for holding
+# -DSQLITE_ENABLE/OMIT/... flags, but that is not enforced here.
proc sqlite-add-feature-flag {args} {
set shell ""
if {"-shell" eq [lindex $args 0]} {
@@ -771,6 +772,9 @@ proc sqlite-finalize-feature-flags {} {
proj-assert {"canonical" eq $::sqliteConfig(build-mode)}
msg-result "Appending source files to amalgamation: $extraSrc"
}
+ if {[lsearch [get-define TARGET_DEBUG ""] -DSQLITE_DEBUG=1] > -1} {
+ msg-result "Note: this is a debug build, so performance will suffer."
+ }
}
########################################################################
@@ -780,7 +784,8 @@ proc sqlite-finalize-feature-flags {} {
proc sqlite-handle-debug {} {
msg-checking "SQLITE_DEBUG build? "
proj-if-opt-truthy debug {
- define TARGET_DEBUG {-g -DSQLITE_DEBUG=1 -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE -O0 -Wall}
+ define TARGET_DEBUG {-g -DSQLITE_DEBUG=1 -O0 -Wall}
+ sqlite-add-feature-flag -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE
proj-opt-set memsys5
msg-result yes
} {
@@ -1384,7 +1389,7 @@ proc sqlite-handle-load-extension {} {
msg-result "Loadable extension support enabled."
} else {
msg-result "Disabling loadable extension support. Use --enable-load-extension to enable them."
- sqlite-add-feature-flag {-DSQLITE_OMIT_LOAD_EXTENSION=1}
+ sqlite-add-feature-flag -DSQLITE_OMIT_LOAD_EXTENSION=1
}
return $found
}
@@ -1398,7 +1403,7 @@ proc sqlite-handle-math {} {
}
define LDFLAGS_MATH [get-define lib_ceil]
undefine lib_ceil
- sqlite-add-feature-flag {-DSQLITE_ENABLE_MATH_FUNCTIONS}
+ sqlite-add-feature-flag -DSQLITE_ENABLE_MATH_FUNCTIONS
msg-result "Enabling math SQL functions"
} {
define LDFLAGS_MATH ""