From: stephan Date: Sat, 19 Nov 2022 02:58:03 +0000 (+0000) Subject: Integrate a custom preprocessor to the JS build process to facilitate creation of... X-Git-Tag: version-3.41.0~413 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c768ef7289c747b5f487319503d9150ef97bfc13;p=thirdparty%2Fsqlite.git Integrate a custom preprocessor to the JS build process to facilitate creation of both vanilla JS and ES6 Module builds from the same source files. There is still some build-level reworking pending to make an ESM build a first-class deliverable. FossilOrigin-Name: 10c723d96d61d2e552ec1102563d58f1eb11bc3d30e03606fd8e0279c5a9043a --- c768ef7289c747b5f487319503d9150ef97bfc13 diff --cc ext/wasm/api/README.md index 6440eba996,6440eba996..d33c4a5831 --- a/ext/wasm/api/README.md +++ b/ext/wasm/api/README.md @@@ -131,3 -131,3 +131,11 @@@ into the build-generated `sqlite3.js` a `sqlite3InitModule()` function with one which, after the module is loaded, also initializes the asynchronous parts of the sqlite3 module. For example, the OPFS VFS support. ++ ++## Preprocessing of Source Files ++ ++Certain files in the build require preprocessing to filter in/out ++parts which differ between vanilla JS builds and ES6 Module ++(a.k.a. esm) builds. The preprocessor itself is in ++[](/file/ext/wasm/c-pp.c) and the associates flags and rules are in ++[](/file/ext/wasm/GNUmakefile). diff --cc manifest index 1fd11cbf21,c7e27a945f..8267d53859 --- a/manifest +++ b/manifest @@@ -1,5 -1,5 +1,5 @@@ - C Small\sperformance\soptimization\sin\sbtree.c. - D 2022-11-19T00:22:12.991 -C More\swork\stowards\screation\sof\sa\sES6\sJS\smodule. -D 2022-11-19T02:51:41.611 ++C Integrate\sa\scustom\spreprocessor\sto\sthe\sJS\sbuild\sprocess\sto\sfacilitate\screation\sof\sboth\svanilla\sJS\sand\sES6\sModule\sbuilds\sfrom\sthe\ssame\ssource\sfiles.\sThere\sis\sstill\ssome\sbuild-level\sreworking\spending\sto\smake\san\sESM\sbuild\sa\sfirst-class\sdeliverable. ++D 2022-11-19T02:58:03.867 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@@ -493,8 -493,8 +493,8 @@@ F ext/wasm/README-dist.txt 2d670b426fc7 F ext/wasm/README.md ef39861aa21632fdbca0bdd469f78f0096f6449a720f3f39642594af503030e9 F ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-api 9120c2f8f51fa85f46dcf4dcb6b12f4a807d428f6089b99cdb08d8ddfcfd88b2 F ext/wasm/api/EXPORTED_RUNTIME_METHODS.sqlite3-api 1ec3c73e7d66e95529c3c64ac3de2470b0e9e7fbf7a5b41261c367cf4f1b7287 --F ext/wasm/api/README.md 1350088aee90e959ad9a94fab1bb6bcb5e99d4d27f976db389050f54f2640c78 - F ext/wasm/api/extern-post-js.js c197b7567496fc27766842f8c4f4963054bf8c667926ab3df4c91aa548939ce6 ++F ext/wasm/api/README.md 29276a845e57004e82efba61fa5866fd05f9137380a1dc26dc4c6d65264cd81c + F ext/wasm/api/extern-post-js.js 824f37f1957e15b150bb36e98621b3bf91b55f6af7055cedc831331129b4883d F ext/wasm/api/extern-pre-js.js cc61c09c7a24a07dbecb4c352453c3985170cec12b4e7e7e7a4d11d43c5c8f41 F ext/wasm/api/post-js-footer.js cd0a8ec768501d9bd45d325ab0442037fb0e33d1f3b4f08902f15c34720ee4a1 F ext/wasm/api/post-js-header.js d6ab3dfef4a06960d28a7eaa338d4e2a1a5981e9b38718168bbde8fdb2a439b8 @@@ -2055,8 -2056,8 +2056,9 @@@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a9 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 - P ff494449efd475878c549728cc22ee9b12d13674068781747fc042a0c1bd09c8 - R 8e4332decceeea7e1973b8e5ac88e8a4 - U drh - Z 80da1bc9f69008afc02dd88003bee918 -P 49d70f071e918d5d095c807575bb7ce2b287a123261e789e938521b3b409429a -R bb5a2de30f99128427e97b8a82e5762a ++P f710cce13577788cf3b95ed7089c3af2854271ff53f0a0b7b0619f315e331eff 6b826e700f6849eebfbba38e5948b96be245994e3e03ea30743114d3f5689c42 ++R a5784f7e95f9f4ca471c3d20c7b7d6ea ++T +closed 6b826e700f6849eebfbba38e5948b96be245994e3e03ea30743114d3f5689c42 Closed\sby\sintegrate-merge. + U stephan -Z e18a8c88533141f60b929eb3534d76f0 ++Z 22024ccae1db68511ad1978bbc10208a # Remove this line to create a well-formed Fossil manifest. diff --cc manifest.uuid index 7e33296fde,50b9b44af1..4b46dcbad7 --- a/manifest.uuid +++ b/manifest.uuid @@@ -1,1 -1,1 +1,1 @@@ - f710cce13577788cf3b95ed7089c3af2854271ff53f0a0b7b0619f315e331eff -6b826e700f6849eebfbba38e5948b96be245994e3e03ea30743114d3f5689c42 ++10c723d96d61d2e552ec1102563d58f1eb11bc3d30e03606fd8e0279c5a9043a