Skip to content

Commit 7b196ab

Browse files
authored
Merge pull request #408 from sparklemotion/flavorjones-sqlite-compiletime-options
ext: compile sqlite with WAL_SYNCHRONOUS=1 and --enable-fts5
2 parents 72e609e + fc607a8 commit 7b196ab

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# sqlite3-ruby Changelog
22

3+
## next / unreleased
4+
5+
### Added
6+
7+
* Compile packaged sqlite3 with additional flags to explicitly enable FTS5, and set synchronous mode to normal when in WAL mode. [#408] (@flavorjones)
8+
9+
310
## 1.6.6 / 2023-09-12
411

512
### Dependencies

ext/sqlite3/extconf.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,18 @@ def configure_system_libraries
4949

5050
def configure_packaged_libraries
5151
minimal_recipe.tap do |recipe|
52-
recipe.configure_options += ["--enable-shared=no", "--enable-static=yes"]
52+
recipe.configure_options += [
53+
"--enable-shared=no",
54+
"--enable-static=yes",
55+
"--enable-fts5",
56+
]
5357
ENV.to_h.tap do |env|
5458
user_cflags = with_config("sqlite-cflags")
5559
more_cflags = [
5660
"-fPIC", # needed for linking the static library into a shared library
5761
"-O2", # see https://github.com/sparklemotion/sqlite3-ruby/issues/335 for some benchmarks
5862
"-fvisibility=hidden", # see https://github.com/rake-compiler/rake-compiler-dock/issues/87
63+
"-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1",
5964
]
6065
env["CFLAGS"] = [user_cflags, env["CFLAGS"], more_cflags].flatten.join(" ")
6166
recipe.configure_options += env.select { |k,v| ENV_ALLOWLIST.include?(k) }

0 commit comments

Comments
 (0)