aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-wasm.c
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2024-10-01 10:49:30 +0000
committerstephan <stephan@noemail.net>2024-10-01 10:49:30 +0000
commited94e0e6778ca00db96690fe93820436cf2676d2 (patch)
treebf36474adda7a1c87eadf9550eecf2e653be5931 /ext/wasm/api/sqlite3-wasm.c
parentcacef23082b8c60a7c211821a1d679bd25348a1e (diff)
downloadsqlite-ed94e0e6778ca00db96690fe93820436cf2676d2.tar.gz
sqlite-ed94e0e6778ca00db96690fe93820436cf2676d2.zip
Add an #if'd-out block to sqlite3-wasm.c mentioning the LONGDOUBLE_TYPE, as brought up in [forum:cbfb0d0ac0a4e349 | forum post cbfb0d0ac]. No functional changes.
FossilOrigin-Name: 0b83e8f1ef53b35a9dda0740b4922b8691428f7484f3058833a961f3f8d0b178
Diffstat (limited to 'ext/wasm/api/sqlite3-wasm.c')
-rw-r--r--ext/wasm/api/sqlite3-wasm.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/wasm/api/sqlite3-wasm.c b/ext/wasm/api/sqlite3-wasm.c
index c5dd495e5..1c46b0ec0 100644
--- a/ext/wasm/api/sqlite3-wasm.c
+++ b/ext/wasm/api/sqlite3-wasm.c
@@ -221,6 +221,21 @@
// See also:
//__attribute__((export_name("theExportedName"), used, visibility("default")))
+#if 0
+/* Details at https://sqlite.org/forum/forumpost/cbfb0d0ac0a4e349
+**
+** Summary: changing to `double` reduces the wasm file size by a mere
+** 2k. It is hypothetically not possible that any clients rely on
+** doubles larger than 64-bit because there is no mapping between C
+** and JS for them. i.e. we "could" switch LONGDOUBLE_TYPE to double
+** for wasm builds with very little risk of problems. Clang 18.1 maps
+** `long double` to float128 but Emscripten doesn't (cannot) expose
+** that to JS.
+*/
+#undef LONGDOUBLE_TYPE
+#define LONGDOUBLE_TYPE double
+#endif
+
/*
** Which sqlite3.c we're using needs to be configurable to enable
** building against a custom copy, e.g. the SEE variant. Note that we