]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Improve --all flag handling so that combinations of (--all --disable-FEATURE) and...
authorstephan <stephan@noemail.net>
Fri, 4 Apr 2025 21:11:32 +0000 (21:11 +0000)
committerstephan <stephan@noemail.net>
Fri, 4 Apr 2025 21:11:32 +0000 (21:11 +0000)
FossilOrigin-Name: 5db613dd407198c2e9f70db64cee2ef5ce8efa2d22d0f45ceb85076adf6bec4a

autosetup/sqlite-config.tcl
manifest
manifest.uuid

index 5dc2bb0a28c341d65267c147428c98766ea4eb4d..501f69a9546cd2e6731fd66d85720a69f9223cdb 100644 (file)
@@ -651,15 +651,41 @@ proc sqlite-setup-default-cflags {} {
 # Handle various SQLITE_ENABLE_... feature flags.
 proc sqlite-handle-common-feature-flags {} {
   msg-result "Feature flags..."
-  foreach {boolFlag featureFlag ifSetEvalThis} {
+  if {"tcl-extension" eq $::sqliteConfig(build-mode)} {
+    set allFlagEnables {fts3 fts4 fts5 rtree geopoly}
+  } else {
+    set allFlagEnables {fts4 fts5 rtree rtree geopoly session}
+  }
+  if {![opt-bool all]} {
+    # Special handling for --disable-all
+    foreach flag $allFlagEnables {
+      if {![proj-opt-was-provided $flag]} {
+        proj-opt-set $flag 0
+      }
+    }
+  }
+  foreach {boolFlag featureFlag ifSetEvalThis} [proj-strip-hash-comments {
     all         {} {
-      # The 'all' option must be first in this list.
-      proj-opt-set fts4
-      proj-opt-set fts5
-      proj-opt-set geopoly
-      proj-opt-set rtree
-      proj-opt-set session
+      # The 'all' option must be first in this list.  This impl makes
+      # an effort to only apply flags which the user did not already
+      # apply, so that combinations like (--all --disable-geopoly)
+      # will indeed disable geopoly. There are corner cases where
+      # flags which depend on each other will behave in non-intuitive
+      # ways:
+      #
+      # --all --disable-rtree
+      #
+      # Will NOT disable geopoly, though geopoly depends on rtree.
+      # The --geopoly flag, though, will automatically re-enable
+      # --rtree, so --disable-rtree won't actually disable anything in
+      # that case.
+      foreach k $allFlagEnables {
+        if {![proj-opt-was-provided $k]} {
+          proj-opt-set $k 1
+        }
+      }
     }
+    fts3         -DSQLITE_ENABLE_FTS3    {sqlite-affirm-have-math fts3}
     fts4         -DSQLITE_ENABLE_FTS4    {sqlite-affirm-have-math fts4}
     fts5         -DSQLITE_ENABLE_FTS5    {sqlite-affirm-have-math fts5}
     geopoly      -DSQLITE_ENABLE_GEOPOLY {proj-opt-set rtree}
@@ -676,7 +702,7 @@ proc sqlite-handle-common-feature-flags {} {
       }
     }
     scanstatus     -DSQLITE_ENABLE_STMT_SCANSTATUS {}
-  } {
+  }] {
     if {$boolFlag ni $::autosetup(options)} {
       # Skip flags which are in the canonical build but not
       # the autoconf bundle.
index a493b12d52bccef733cc42f404e3140141ba001e..9fc628a7159e93b656aaa12085b70d8d2f70c77e 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Account\sfor\sthe\sMac-specific\s-install_name\slinker\sflag.\sSee\s[forum:5651662b8875ec0a|forum\spost\s5651662b8875ec0a].
-D 2025-04-04T20:58:11.918
+C Improve\s--all\sflag\shandling\sso\sthat\scombinations\sof\s(--all\s--disable-FEATURE)\sand\s(--disable-all\s--FEATURE)\swork\smore\sintuitively.\sAdd\smissing\shandling\sof\sthe\s--fts3\sflag\s(it\swas\saccepted\sbut\signored\sbefore).\sPartial\smerge\sof\s[26ef0ff4bfbb],\sminus\sproj.tcl\schanges.
+D 2025-04-04T21:11:32.369
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -50,7 +50,7 @@ F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e
 F autosetup/jimsh0.c a57c16e65dcffc9c76e496757cb3f7fb47e01ecbd1631a0a5e01751fc856f049
 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
 F autosetup/proj.tcl 187d82550cfa55df00e285542e88278c51876d7813d63eaffb2fc5af40566d9f
-F autosetup/sqlite-config.tcl fb01eaa907f691b9324094a6d055a7ff93a7f76742ccae2e5c0625ed8f73fcf9
+F autosetup/sqlite-config.tcl cd94d051112c6ef40b06d4924fc34951c0f303e629f854d4a5750951adac5439
 F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
 F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
 F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
@@ -2209,9 +2209,9 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P f5aea14e6e20ede782500615c4378725680c235eb8f6bbfbcdb1efd4adf6112e
-Q +4947c1c78298253a51939adf6cf70ee233075db6d60cd7a183a4162c926e667c
-R 1d26d42f5e937a2d7a072d0a37b64906
+P 8830f86335855e0cd508830a3c53590a734e0cd618d79e3eb1546a70b883d15e
+Q +26ef0ff4bfbb4425baa26fa5c8420f5da0603c38ef651104e566c7dc85bfaa3a
+R 52232a44391ae94fb0641b1c7a2c5a62
 U stephan
-Z 3fee1580315dc8ceed66f36c20fa2ed9
+Z ba02e746034e7db7d8acf2f58f6a7dfe
 # Remove this line to create a well-formed Fossil manifest.
index 48bc632f84bc77cf835c9eb1667e9dc76fa4f132..5d2387937d8ae84f1b5c98725529f53dbaaac7ff 100644 (file)
@@ -1 +1 @@
-8830f86335855e0cd508830a3c53590a734e0cd618d79e3eb1546a70b883d15e
+5db613dd407198c2e9f70db64cee2ef5ce8efa2d22d0f45ceb85076adf6bec4a