1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-21 11:13:54 +03:00
Commit Graph

66 Commits

Author SHA1 Message Date
stephan
b4fdfc2f9a Update c-pp.c and rename it to c-pp-lite.c to match its new upstream name. Adapt the JS files and mkwasmbuilds.c for c-pp syntactic changes.
FossilOrigin-Name: bb13e46ddfcd1d3ca73845430d9a91c0ea3913762d39bbd94127783d77e4f63b
2025-10-09 15:28:59 +00:00
stephan
436c8e5026 Remove the long-defunct wasmfs build of speedtest1 from index.html and re-enable the wasmfs scratchpad app (which still works). Fix the CFLAGS for the wasmfs build and the path to the wasm file for one of the JS.
FossilOrigin-Name: acaaf8cce9e780bf937436b4c987ed284aa0bba6f5ca9508d9dbad598af2991d
2025-09-28 18:03:29 +00:00
stephan
0b0c8734f3 Improve #if support in, and add #assert to, c-pp. Rename target=... preprocessor symbols to target:... because changes in the semantics for symbols which have an '=' makes some of those #if blocks mutually exclusive (which we won't want in rare cases involving the bundler-friendly builds).
FossilOrigin-Name: 54287487793d48f6dde919446ab7476aea0cc0aba3835c80f060a7b84221881a
2025-09-28 00:53:00 +00:00
stephan
4ac2118c5d Teach c-pp how to replace configure-script-like @tokens@, giving us a much simpler way to get the proper WASM file name injected into each JS build.
FossilOrigin-Name: ffd5c8eaa89250a043b573c3eb66693dfec087a5b5eef184ae6d7bfbcf61235a
2025-09-27 11:38:35 +00:00
stephan
879066a0a2 Delay replacing the wasm file name strings until they're needed. Add target b-all to run all known wasm builds.
FossilOrigin-Name: a4edaecc9b0b649df53a99e05d9abfbc5bdb40d45c7c6940a50b24fa30dca158
2025-09-26 19:41:07 +00:00
stephan
e309de27f9 Consolidate some duplicate code in mkwasmbuilds.c.
FossilOrigin-Name: 1078aa4f1e5685d45e31eea622865ddd077f367f1cec90fc267e8ba50cbe2ee9
2025-09-26 19:30:34 +00:00
stephan
a34f87d25a Clean up how the speedtest1 64-bit test/demo files are generated. Make log output very slightly less verbose.
FossilOrigin-Name: 64715e92708e4f8c5b82c1f4ed71b75f418bf741f7f05516eab309582fbfad2b
2025-09-26 19:19:35 +00:00
stephan
42f9273da2 Get 64-bit builds of speedtest1.wasm running in order to better compare 32-/64-bit performance (spoiler alert: the latter is consistently roughly 10% slower). Add WASM heap usage info to speedtest1.
FossilOrigin-Name: 70b944cc0189309c2265b184381f2f050bced7b83f204d57b912def6e203982a
2025-09-26 18:29:00 +00:00
stephan
96c753ec56 Reinstate the Module.instantiateWasm() override and simplify how the wasm filename gets injected into the JS files.
FossilOrigin-Name: e878ffd2eaa87e2978c44fcd03a1eb6114a9ae31e31101898d682f43cf81000f
2025-09-26 17:11:39 +00:00
stephan
3a94a00768 Get wasmfs build working in the new setup. Disable the custom wasm loader because its generated makefile code is currently broken.
FossilOrigin-Name: 36bc2514f70af5608aa20903d9c38b316603e2f78f2cbf4a20c7c79b60c5b8d5
2025-09-26 12:49:41 +00:00
stephan
c839ea5d94 Docs and dead code removal in mkwasmbuilds.c.
FossilOrigin-Name: d022ee167b90a7c32049a93d476e869270018017f60551185024409730d77640
2025-09-26 11:47:13 +00:00
stephan
5ace5e0a38 More build docs. Add a speedtest1 64-bit build but it's not hooked up to any test apps yet. Improve invalid-arg detection in c-pp.
FossilOrigin-Name: 69086be8a155d70d9dd7b655b66809250b24fe6d5bcdc6cb5e0275446a43f51d
2025-09-26 02:18:28 +00:00
stephan
c1254430d8 Build cleanups and dead code removal.
FossilOrigin-Name: b516109e5accc885b71900402c800ae855407552648861334c895f0e5dea4ee5
2025-09-26 01:38:07 +00:00
stephan
5dbbbf4923 Remove some superfluous tabs and add the mkwasmbuilds ability to emit just its prologue.
FossilOrigin-Name: 75079401753778e3bc2f7fa307de9217e8d1ec395079fc1009060f707be32943
2025-09-25 14:44:03 +00:00
stephan
96d39ce7d2 Minor logging fix for the wasm-opt build step.
FossilOrigin-Name: 918eca02d162cfa98613f9d8d9b0901f9f94ae1bcb53d811b09baec6c3f06bbe
2025-09-25 14:39:41 +00:00
stephan
653e32e9a1 Move fiddle.make into the main makefile. Various adjacent cleanups and docs.
FossilOrigin-Name: fabd6160d0c128592ce512b1160dfa0b89b1fbb03e11cd185c6a4888a85cc7fb
2025-09-25 14:29:47 +00:00
stephan
3ed76ca35b Minor build cleanups.
FossilOrigin-Name: 05e7ea021388fcac975779cd2a70e341e25670e70d1d9f372f15b823b2466750
2025-09-25 02:30:55 +00:00
stephan
99cb0049ee Consolidate the speedtest1 wasm build into the new mkwasmbuilds.c model. Remove the long-unused batch-runner JS tools.
FossilOrigin-Name: 980c033c05bf37c0e8f5e82486ee99ba1294cc9c9e2087aaf83b64e5d0118b5f
2025-09-25 02:02:48 +00:00
stephan
ef565295f5 Wasm build deps fixes.
FossilOrigin-Name: fd0c649047f4e444ea682138a3555a973839627150e1124bb9d9ced17880a9e5
2025-09-25 00:53:30 +00:00
stephan
9daf58ee8d Move the static makefile code from mkwamsbuilds.c into the makefile. Move util.make back into the main makefile. Remove a bunch of dead makefile code and docs.
FossilOrigin-Name: 18beeb26bfa48f806866e0e330024535adabcf668071abc4b6251eb39de2701d
2025-09-24 23:07:45 +00:00
stephan
6d3ae03f1e Get the tester1 worker1/promiser demos building again. Show WASM heap usage in tester1 if.
FossilOrigin-Name: 6691a84872f823c95b0bdc3db8e12d21c9561aa1e1ce1d787a977f2c5ef8225a
2025-09-24 20:39:08 +00:00
stephan
36baed3e2e Add docs to mkwasmbuilds.c explaining the purpose of each of the builds. Remove some inadvertent copy/paste hard tabs in some C-side makefile code.
FossilOrigin-Name: a2bd965e103026ff5c722357ed9e3432172bbc19d267e718ebd4a876eca41742
2025-09-24 13:59:53 +00:00
stephan
8d93e83461 Cosmetic build tweaks.
FossilOrigin-Name: 431725330d6c63575dbf3404664a7af33d4d87c569560e99c18de93eb4d73935
2025-09-24 07:31:19 +00:00
stephan
5c01f3fb83 Further wasm build refactoring. Get speedtest1 building again.
FossilOrigin-Name: 5434307dcd927686ce827da22de55020c4b431f888ac81ae3634d458ad0b563d
2025-09-24 06:43:24 +00:00
stephan
e779baa099 Move some of the generated wasm makefile utility code out of C and into util.make.
FossilOrigin-Name: a2935758f534b51cac3d2e5ece74b369c806e3a994781744708e1590b9c32542
2025-09-24 04:58:14 +00:00
stephan
3b56f296e9 Generic build simplifications.
FossilOrigin-Name: 61648610c3e454fce77b78e6f6be1b71e27bb9587af03ae5c0e083eac7158a64
2025-09-24 03:05:31 +00:00
stephan
0dee14a559 Get fiddle building properly again and fiddle/fiddle.debug building in parallel.
FossilOrigin-Name: 85fe9c6155f72583cea46d38bf5e040623d71fb5317ff9373421dbfdb179b2b0
2025-09-24 01:50:08 +00:00
stephan
ac37661a16 Get fiddle/fiddle.debug building again but they're incomplete and don't run.
FossilOrigin-Name: d725a075bc3303c5a26c4014f57162235cebc6491425083b4d80936de8f07fb0
2025-09-23 23:22:31 +00:00
stephan
cfce9b6a11 Get most of the wasm build (re)working and much prettier.
FossilOrigin-Name: a5a7890c75003a637a227b700dc342f4f4a24bd368b216bdb168b4ddfbe8f015
2025-09-23 13:49:44 +00:00
stephan
a07871d332 Cosmetic wasm build tweaks. Fixed wasm-opt use, broken by this branch's refactoring.
FossilOrigin-Name: 4d7eff2afbcf023291bc1133c4413d1ea44f4096bb515e4bcd40bc8fc8d2a591
2025-09-23 10:46:17 +00:00
stephan
5c0850f8b8 Make it easier to pick out which parallel build messages belong to which wasm build.
FossilOrigin-Name: 913af3dd6a8da577ef19b0d82c8afec0c626d7fa5fddbdf418d2eb16c3050ab1
2025-09-23 08:44:07 +00:00
stephan
ebb99967c2 More build restructuring.
FossilOrigin-Name: 7bee8ee76380b2c1beb320b55042f149c22f872c70b58461652fa5bcbf6ad3c7
2025-09-23 08:23:23 +00:00
stephan
aa5b8f9d47 Create each distinct wasm build into its own dir, instead of all going to in jswasm/sqlite3.wasm, so that the build can now run in parallel.
FossilOrigin-Name: 47526a75f2ad85100b1eae7ab1cf9a9dddd4430a99f7a30aa0c16548d1db9d33
2025-09-23 06:31:24 +00:00
stephan
91b1b0de2b Start reworking the wasm build (again) with an eye towards simplifying it. Currently only the canonical and esm builds work, not fiddle, speedtest, nor the bundler stuff.
FossilOrigin-Name: 102c4a35b86405273d1f7e9e34466c9deed7831099a8207b6f48746b998193f9
2025-09-23 05:10:19 +00:00
stephan
12f17d41f9 Add makefile target '64bit' to ext/wasm/GNUmakefile to build the 64-bit bundles. It does not yet generate copies of the test apps to load/test them, pending other reworking of the build.
FossilOrigin-Name: 3e2ea990ad76f9e68d514568f53eaa692a1eb11695fceb1bcc58cea00605fff9
2025-09-23 02:04:07 +00:00
stephan
1ab3d7eafd Cleanups and docs in the internal parts of the JS lib bootstrapping. More tinkering with the custom (but still disabled) wasm file loader.
FossilOrigin-Name: 35651d9ab5529da915500fc50ca3833a004d0b7a19d98e8fbf39234d94697aec
2025-09-22 17:29:52 +00:00
stephan
5a2e3c4af2 Experimenting with a custom wasm loader, but don't enable it without an explicit build flag. The goal here is to make the WebAssembly.Module object available internally (the default loader hides it from us).
FossilOrigin-Name: e5f0256feab95c30a8e3e1e69963fb3e25ed2da296aff5bc6646fe96a76c0b81
2025-09-22 02:40:06 +00:00
stephan
93cd069fdf Improve deps handling of fiddle's gzipped output files to help avoid stale gz files during development (althttpd will prefer those over the uncompressed ones). Only compress the larger files, not the small html/js pieces.
FossilOrigin-Name: bb945f52909caa2577de38711883a79ca918b3716e5e0c2fed6e6ef12e19aeef
2025-09-20 20:17:17 +00:00
stephan
cf05295a85 Diverse wasm build cleanups.
FossilOrigin-Name: 14ca18f72a7edde7c65a6c6b23fdc3f5ed6860371795926045c987f7b2c75e1b
2025-07-16 20:50:40 +00:00
stephan
074b1aa42d In the wasm makefiles, replace X:=Y with X=Y because := has different semantics depending on the make impl and its use is arguably a bad muscle-memory habit worth breaking. These makefiles are very specifically for GNU make, but long-term it would be nice to eliminate that requirement.
FossilOrigin-Name: d4203311a2f39189ed8f30d519468aed8983af7772a5b247e7557d3e1936064e
2025-07-16 14:51:23 +00:00
stephan
522ce56734 wasm: remove some extraneous levels of makefile var and fix the (unsupported) wasmfs speedtest1 build to account for var renaming which happened long before this.
FossilOrigin-Name: 35b2315343e22ca12c6ee3f5be8741eba889bb6461e08fad0a8ae7db033319cb
2025-07-16 13:22:38 +00:00
stephan
68b74e2c42 Remove an unnecessary step from the wasm builds and account for a recent Emscripten-internal code-generation change which caused a post-build cleanup step to not actually clean up (harmless, but adds about 26k of useless stuff to the resulting JS).
FossilOrigin-Name: a8ed16989dcd324bd9caa09aec7979249deaf59ca13bc377379ddd83c53379cd
2025-07-16 11:56:16 +00:00
stephan
e5a7b815af Further internal wasm build cleanups. No functional changes.
FossilOrigin-Name: 8364d89c3bc1d1dbd95b4324a41bd655251ebd2da5b9f1b9f9aceba9c3d26d3d
2025-07-16 11:09:18 +00:00
stephan
f98148be9c Internal refactoring of the WASM build makefile rule generator, working towards parallelizing the various build modes (which is not currently possible because most modes share the same sqlite3.wasm output file name).
FossilOrigin-Name: 1062b61e9c949d76791ed7974cf6c38d1cec9797a930e9ad7ca851130f5e9a48
2025-07-16 10:34:14 +00:00
stephan
a29b138692 Apply the duplicate 'export default' workaround to the (untested and unsupported) node-specific build rules in mkwasmbuilds.c to resolve a problem reported off-list by Thomas Steiner.
FossilOrigin-Name: 2f8a1b79533879e4975b405c46fea496ba8bffbef065e7dd0ad29fd4aa8f8f92
2025-06-03 18:10:59 +00:00
stephan
e435547beb Internal doc touchups in ext/wasm/mkwasmbuilds.c. No functional changes.
FossilOrigin-Name: 47d34260e74912eeae704bff7c4314b893af86ee66dd96a1bc6f450d3e290702
2025-03-18 13:52:53 +00:00
stephan
da5f813878 Approximately 100 typo corrections spanning the whole tree, submitted via [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text.
FossilOrigin-Name: f50c21484d3cac73589da0376c423de39ae8b842218105786c5aa3726e4dcaed
2025-02-27 21:17:55 +00:00
stephan
d804893762 Fix a bug in mkwasmbuilds.c which caused sqlite3.wasm to get deleted directly after it was built.
FossilOrigin-Name: 1a72d1d13e42f69f02861f8ac3058e69b78d4fd2050ca8c53a1ce016b7e0863d
2025-02-26 03:20:26 +00:00
stephan
9e632f5512 wasm: do not build the (untested/unsupported) node-for-node build by default, to cut build time by about 15%. Adjacent cleanups in mkwasmbuilds.c.
FossilOrigin-Name: e4539ebebd89840b76f5a0626393299100685a38f45546a0bf7a62e4df56f863
2025-02-20 05:39:18 +00:00
stephan
e108f97256 wasm: add some build-time validation to ensure that the problem fixed in [65798c09a00662a3] does not recur. Ensure that files generated via mkwasmbuilds.c have the generated makefile as a dependency.
FossilOrigin-Name: 55e01365946b3432e93da5c08200e476e2a134c98b963b4170e4dfae8408a005
2025-02-09 04:16:01 +00:00