aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-wasm.c
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2024-10-01 17:08:23 +0000
committerstephan <stephan@noemail.net>2024-10-01 17:08:23 +0000
commitc9c1b65698ed3fa83985c92e02dd872b56948f79 (patch)
tree2e4f82c266d2a8b04d9cf1e41e37e4e417286b0b /ext/wasm/api/sqlite3-wasm.c
parentdac22f656646db9b9429d13c7fcd0a20d6b8a9d6 (diff)
downloadsqlite-c9c1b65698ed3fa83985c92e02dd872b56948f79.tar.gz
sqlite-c9c1b65698ed3fa83985c92e02dd872b56948f79.zip
Use the new SQLITE_USE_LONG_DOUBLE to disable long-double support in WASM builds, as they cannot be represented in JS and this saves approximately 5.5kb in the resulting wasm file.
FossilOrigin-Name: fa7b56f776b715d061581fad6f04b871504ff5d808e7364419d1d6cdef82c5ee
Diffstat (limited to 'ext/wasm/api/sqlite3-wasm.c')
-rw-r--r--ext/wasm/api/sqlite3-wasm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/wasm/api/sqlite3-wasm.c b/ext/wasm/api/sqlite3-wasm.c
index 1c46b0ec0..945acd23d 100644
--- a/ext/wasm/api/sqlite3-wasm.c
+++ b/ext/wasm/api/sqlite3-wasm.c
@@ -127,6 +127,10 @@
# define SQLITE_USE_URI 1
#endif
+#ifndef SQLITE_USE_LONG_DOUBLE
+# define SQLITE_USE_LONG_DOUBLE 0
+#endif
+
#ifdef SQLITE_WASM_EXTRA_INIT
# define SQLITE_EXTRA_INIT sqlite3_wasm_extra_init
#endif
@@ -159,6 +163,8 @@
# define SQLITE_OMIT_PROGRESS_CALLBACK
# undef SQLITE_OMIT_WAL
# define SQLITE_OMIT_WAL
+# undef SQLITE_USE_LONG_DOUBLE
+# define SQLITE_USE_LONG_DOUBLE 0
/*
The following OMITs do not work with the standard amalgamation, so
require a custom build: