From: stephan Date: Wed, 16 Jul 2025 18:51:07 +0000 (+0000) Subject: Code style conformance tweaks and remove a ref to a now-dead makefile var. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fwasm-build-parallel;p=thirdparty%2Fsqlite.git Code style conformance tweaks and remove a ref to a now-dead makefile var. FossilOrigin-Name: a3cec8c714d2e4a8d6f589b60b17f38bc8b06478368bba8e3ee503f5a2f07960 --- diff --git a/ext/wasm/GNUmakefile b/ext/wasm/GNUmakefile index 3da2fb67bb..12baf6068e 100644 --- a/ext/wasm/GNUmakefile +++ b/ext/wasm/GNUmakefile @@ -958,11 +958,11 @@ all: $(dir.dout)/sqlite3-worker1.js \ $(dir.dout)/sqlite3-worker1-promiser.js $(dir.dout)/sqlite3-worker1-promiser.mjs demo-worker1-promiser.html: $(dir.dout)/sqlite3-worker1-promiser.js demo-worker1-promiser.js -demo-worker1-promiser-esm.html: $(sqlite3-worker1-promiser.mjs) demo-worker1-promiser.mjs +demo-worker1-promiser-esm.html: $(dir.dout)/sqlite3-worker1-promiser.mjs demo-worker1-promiser.mjs all: demo-worker1-promiser.html demo-worker1-promiser-esm.html sqlite3-api.ext.jses += \ - $(sqlite3-worker1-promiser.mjs) \ + $(dir.dout)/sqlite3-worker1-promiser.mjs \ $(dir.dout)/sqlite3-worker1-bundler-friendly.mjs \ $(dir.dout)/sqlite3-worker1.js all quick: $(sqlite3-api.ext.jses) diff --git a/ext/wasm/mkwasmbuilds.c b/ext/wasm/mkwasmbuilds.c index 511c05d34d..aee7359cbb 100644 --- a/ext/wasm/mkwasmbuilds.c +++ b/ext/wasm/mkwasmbuilds.c @@ -91,8 +91,8 @@ struct BuildDef { const char *zMode; /* Name from JS_BUILD_MODES */ int flags; /* Flags from LibModeFlags */ const char *zJsOut; /* Base name of generated sqlite3.js/.mjs */ - /* TODO: dynamically determine zJsOut based on zName, zMode, and - flags. */ + /* TODO? dynamically determine zJsOut based on zName, zMode, and + ** flags. */ const char *zCmppD; /* Extra -D... flags for c-pp */ const char *zEmcc; /* Extra flags for emcc */ }; @@ -397,17 +397,22 @@ static void mk_lib_mode(const BuildDef * pB){ snprintf(aOutBuf, sizeof(aOutBuf), "$(dir.tmp)/%s-%s", zNM); /* Set up build-specific output dir. Several of the builds generate - a file named sqlite3.wasm, which precludes us building them in - parallel. We use a build-specific dir to enable parallization of - those builds. All such builds will generate a byte-for-byte - identical sqlite3.wasm so long as all Emscripten-related flags - which influence that file are the same (i.e. where pB->zEmcc is - the same), which is the case for most of the affected builds. */ + ** a file named sqlite3.wasm, which precludes us building them in + ** parallel. We use a build-specific dir to enable parallization of + ** those builds. All such builds will generate a byte-for-byte + ** identical sqlite3.wasm so long as all Emscripten-related flags + ** which influence that file are the same (i.e. where pB->zEmcc is + ** the same), which is the case for most of the affected builds. */ pf("dir.tmp.%s-%s = %s\n", zNM, aOutBuf); - pf("$(dir.tmp.%s-%s)/.mkdir:\n\tmkdir -p $(dir.tmp.%s-%s)\n\ttouch $@\n", - zNM, zNM); + pf("$(dir.tmp.%s-%s):\n\tmkdir -p $@\n", zNM); +#if 0 + /* We don't need to add cleanup rules so long as these dirs are + ** under $(dir.tmp), as that dir will be cleaned up by 'make + ** clean'. If these dirs move somewhere else, we'll want to add a + ** rule like...*/ pf("clean-%s-%s:\n\trm -fr $(dir.tmp.%s-%s)\n" - "clean: clean-%s-%s\n", zNM, zNM, zNM); + "clean: clean-%s-%s\n", zNM, zNM, zNM); +#endif pf("\nemcc.flags.%s.%s ?=\n", zNM); if( pB->zEmcc && pB->zEmcc[0] ){ @@ -416,15 +421,15 @@ static void mk_lib_mode(const BuildDef * pB){ /* target pB->zJsOut */ pf("$(dir.tmp.%s-%s)/%s: " - "$(dir.tmp.%s-%s)/.mkdir " + "$(dir.tmp.%s-%s) " "$(MAKEFILE_LIST) $(sqlite3-wasm.cfiles) $(EXPORTED_FUNCTIONS.api) " "$(pre-post-%s-%s.deps) " "$(sqlite3-api.ext.jses)" /* ^^^ maintenance reminder: we set these as deps so that they - get copied into place early. That allows the developer to - reload the base-most test pages while the later-stage builds - are still compiling, which is especially helpful when running - builds with long build times (like -Oz). */ + ** get copied into place early. That allows the developer to + ** reload the base-most test pages while the later-stage builds + ** are still compiling, which is especially helpful when running + ** builds with long build times (like -Oz). */ "\n", zNM, pB->zJsOut, zNM, zNM); pf("\t@echo \"Building [%s-%s] %s ...\"\n", zNM, pB->zJsOut); @@ -448,15 +453,15 @@ static void mk_lib_mode(const BuildDef * pB){ "\t\t$(maybe-wasm-strip) %s;\n", zWasmOut, zWasmOut) /* For whatever reasons, .wasm files get built with their +x bit - set. That upsets althttpd, which uses +x as an indication that - the file is a CGI script. There's no apparent useful reason to - have +x set on these, so we -x them. */; + ** set. That upsets althttpd, which uses +x as an indication that + ** the file is a CGI script. There's no apparent useful reason to + ** have +x set on these, so we -x them. */; pf("\t@$(call SQLITE.CALL.WASM-OPT,%s)\n", zWasmOut); pf(/* Our JS code installs bindings of each WASM export. The - generated Emscripten JS file does the same using its own - framework, but we don't use those results and can speed up lib - init, and reduce memory cost a bit, by stripping them out. Of - of this writing, this strips approximately 25kb of JS code. */ + ** generated Emscripten JS file does the same using its own + ** framework, but we don't use those results and can speed up lib + ** init, and reduce memory cost a bit, by stripping them out. Of + ** of this writing, this strips approximately 25kb of JS code. */ "\t@sed -i -e '/^.*= *_sqlite.*= *createExportWrapper/d' $@ || exit; \\\n" /* ^^^^^^ reminder: Mac/BSD sed has no -i flag */ "\t\techo 'Stripped out createExportWrapper() parts.'\n"); diff --git a/manifest b/manifest index fd2c8cc345..6f3a35c2b4 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Build\s.wasm/.js\sfiles\sinto\sa\sbuild-mode-specific\ssubdir,\sthe\sgoal\sbeing\sto\sbe\sable\sto\sbuild\sthem\sin\sparallel.\sThis\sworks,\sbut\s(A)\sadds\sa\sbit\sof\sbuild\sugliness\sand\s(B)\sis\snot\sactually\sparallelizing,\sso\sneeds\sa\scloser\slook\safter\sa\sbreak. -D 2025-07-16T17:00:38.236 +C Code\sstyle\sconformance\stweaks\sand\sremove\sa\sref\sto\sa\snow-dead\smakefile\svar. +D 2025-07-16T18:51:07.591 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -622,7 +622,7 @@ F ext/session/sqlite3session.c 19e14bcca2fbc63a8022ffd708ea6e6986c4003a1e9bbca9b F ext/session/sqlite3session.h b81e8536ce4b83babafd700f4ff67017804b6c1d71df963b30d3972958e7f4a7 F ext/session/test_session.c 8766b5973a6323934cb51248f621c3dc87ad2a98f023c3cc280d79e7d78d36fb F ext/wasm/EXPORTED_FUNCTIONS.fiddle.in 27450c8b8c70875a260aca55435ec927068b34cef801a96205adb81bdcefc65c -F ext/wasm/GNUmakefile 55f580cc174cec7980a6ec6ab337fb0c9f199d6dba44b41eddf88268143d7522 +F ext/wasm/GNUmakefile c2c56df1497ab4db3155fb8f1d1f3831da73ccf0c9135a3b57937f3b0c367950 F ext/wasm/README-dist.txt f01081a850ce38a56706af6b481e3a7878e24e42b314cfcd4b129f0f8427066a F ext/wasm/README.md b89605f65661cf35bf034ff6d43e448cc169b8017fc105d498e33b81218b482c F ext/wasm/SQLTester/GNUmakefile e0794f676d55819951bbfae45cc5e8d7818dc460492dc317ce7f0d2eca15caff @@ -683,7 +683,7 @@ F ext/wasm/index-dist.html 56132399702b15d70c474c3f1952541e25cb0922942868f70daf1 F ext/wasm/index.html bcaa00eca521b372a6a62c7e7b17a870b0fcdf3e418a5921df1fd61e5344080d F ext/wasm/jaccwabyt/jaccwabyt.js 6e4f26d0edb5c2e7d381b7eff1924832a040a12274afab2d1e1789027e9f6c5c F ext/wasm/jaccwabyt/jaccwabyt.md 1128e3563e7eff90b5a373395251fc76cb32386fad1fea6075b0f34a8f1b9bdf -F ext/wasm/mkwasmbuilds.c 809878ea14f739f82102ff71671bad0c52e241fb8c1f0b9fd52c5d9daf9acec8 +F ext/wasm/mkwasmbuilds.c 1802cfde031fc544e27ea0ffaa5299b44c448e93461a96000430d4d5db8f9139 F ext/wasm/module-symbols.html dc476b403369b26a1a23773e13b80f41b9a49f0825e81435fe3600a7cfbbe337 F ext/wasm/scratchpad-wasmfs.html a3d7388f3c4b263676b58b526846e9d02dfcb4014ff29d3a5040935286af5b96 F ext/wasm/scratchpad-wasmfs.mjs 66034b9256b218de59248aad796760a1584c1dd842231505895eff00dbd57c63 @@ -2213,11 +2213,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 7ef22c3d11088210d2267375ec188bd352b067614200394b9877f2e40dc12bb2 -R 7d952852b2799a65acea3c84253af2d1 -T *branch * wasm-build-parallel -T *sym-wasm-build-parallel * -T -sym-trunk * Cancelled\sby\sbranch. +P 5e11d054122a246b14bb399acb08bff80a16060d648fb6337689d623afc00474 +R 14378747692c07c1f121456faf39172d U stephan -Z 6d80506eb04a928ca3c1919e5188abeb +Z 2ea9e80244cda6d14448f41e0d9420e6 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 93e5fd5b36..2b190ed8c2 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -5e11d054122a246b14bb399acb08bff80a16060d648fb6337689d623afc00474 +a3cec8c714d2e4a8d6f589b60b17f38bc8b06478368bba8e3ee503f5a2f07960