** only their JS file and patch their JS to use the WASM file from a
** canonical build which uses that same WASM file. Reusing X.wasm
** that way can only work for builds which are processed identically
- ** by Emscripten. For a given set of C flags (as opposed to
+ ** by Emscripten. For a given set of C flags (as distinct from
** JS-influencing flags), all builds of X.js and Y.js will produce
** identical X.wasm and Y.wasm files. Their JS files may well
** differ, however.
*/
- CP_JS = 1 << 30,
- CP_WASM = 1 << 31,
+ CP_JS = 1 << 30, /* X.js or X.mjs, depending on F_ESM */
+ CP_WASM = 1 << 31, /* X,wasm */
CP_ALL = CP_JS | CP_WASM
};
** final build directory $(dir.dout).
**
** To keep parallel builds from stepping on each other, each distinct
-** build goes into its own subdir $(dir.dout.BuildName)[^1], i.e.
-** $(dir.dout)/BuildName. Builds which produce deliverables we'd like
-** to keep/distribute copy their final results into the build dir
-** $(dir.dout). See the notes for the CP_JS enum entry for more
-** details on that.
+** build goes into its own subdir $(dir.dout.$(BuildDef::zBaseName).
+** Builds which produce deliverables we'd like to keep/distribute copy
+** their final results into the build dir $(dir.dout). See the notes
+** for the CP_JS enum entry for more details on that.
**
** The final result of each build is a pair of JS/WASM files, but
** getting there requires generation of several files, primarily as
**
** --extern-post-js = gets injected immediately after
** sqlite3InitModule(), in the global scope. In this step we replace
-** sqlite3InitModule() with a slightly customized, the main purpose of
-** which is to (A) give us (not Emscripten) control over the arguments
-** it accepts and (B) to run the library bootstrap step.
+** sqlite3InitModule() with a slightly customized one, the main
+** purpose of which is to (A) give us (not Emscripten) control over
+** the arguments it accepts and (B) to run the library bootstrap step.
**
** Then there's sqlite3-api.BuildName.js, which is the entire SQLite3
** JS API (generated from the list defined in $(sqlite3-api.jses)). It
**
** Each of those inputs has to be generated before passing them on to
** Emscripten so that any build-specific capabilities can get filtered
-** in or out (using ./c-pp.c).
-**
-** [^1]: The legal BuildNames are in this file's BuildDef_map macro.
+** in or out (using ./c-pp-lite.c).
*/
struct BuildDef {
/*
**
** The convention for 32- vs 64-bit pairs is to give them similar
** emoji, e.g. a cookie for 32-bit and a donut or cake for 64.
- ** Alternately, the same emoji a "64" suffix, excep that that throws
- ** off the output alignment in parallel builds ;).
+ ** Alternately, the same emoji a "64" suffix, except that that
+ ** throws off the output alignment in parallel builds ;).
*/
const char *zEmo;
/*
const char *zCmppD; /* Extra -D... flags for c-pp */
const char *zEmcc; /* Full flags for emcc. Normally NULL for default. */
const char *zEmccExtra; /* Extra flags for emcc */
- const char *zDeps; /* Extra deps */
+ const char *zDeps; /* Extra make target deps */
const char *zEnv; /* emcc -sENVIRONMENT=... value */
/*
** Makefile code "ifeq (...)". If set, this build is enclosed in a
** The set of WASM builds for the library (as opposed to the apps
** (fiddle, speedtest1)). Their order in BuildDefs_map is mostly
** insignificant, but some makefile vars used by some builds are set
-** up by prior builds. Because of that, the (sqlite3, vanilla),
-** (sqlite3, esm), and (sqlite3, bundler-friendly) builds should be
-** defined first (in that order).
+** up by prior builds. Because of that, the vanilla, esm, and
+** bundler-friendly builds should be defined first (in that order).
*/
struct BuildDefs {
#define E(N) BuildDef N;
.zDeps = 0,
.zIfCond = 0,
.flags = CP_JS | F_BUNDLER_FRIENDLY | F_ESM
- //| F_NOT_IN_ALL
},
/* 64-bit bundler-friendly. */
.node = {
.zEmo = "🍟",
.zBaseName = "sqlite3-node",
- .zDotWasm = 0,
+ .zDotWasm = "sqlite3",
.zCmppD = "-Dtarget:node $(c-pp.D.bundler)",
.zEmcc = 0,
.zEmccExtra = 0,
** node. */,
.zDeps = 0,
.zIfCond = 0,
- .flags = CP_ALL | F_UNSUPPORTED | F_NODEJS
+ .flags = CP_ALL | F_UNSUPPORTED | F_ESM | F_NODEJS
},
/* 64-bit node. */
.node64 = {
.zEmo = "🍔",
.zBaseName = "sqlite3-node-64bit",
- .zDotWasm = 0,
+ .zDotWasm = "sqlite3-64bit",
.zCmppD = "-Dtarget:node $(c-pp.D.bundler)",
.zEmcc = 0,
.zEmccExtra = 0,
.zEnv = "node",
.zDeps = 0,
.zIfCond = 0,
- .flags = CP_ALL | F_UNSUPPORTED | F_NODEJS | F_64BIT
+ .flags = CP_ALL | F_UNSUPPORTED | F_ESM | F_NODEJS | F_64BIT
},
/* Entirely unsupported. */
if( pB->flags & F_64BIT ){
pf("c-pp.D.%s += $(c-pp.D.64bit)\n", zBuildName);
}
+ if( pB->flags & F_UNSUPPORTED ){
+ pf("c-pp.D.%s += -Dunsupported-build\n", zBuildName);
+ }
pf("emcc.environment.%s ?= %s\n", zBuildName,
pB->zEnv ? pB->zEnv : oBuildDefs.vanilla.zEnv);
-C Teach\sc-pp\sto\sexport\sits\sargv\sas\sa\s#define\slist\sso\sthat\swe\scan\sembed\sit\sin\sthe\sgenerates\sfiles.
-D 2025-11-13T08:26:11.671
+C mkwasmbuilds.c\sdoc\supdates.\sMerge\sin\sthe\sparts\sof\s[8611cf643b]\swhich\sare\snot\scontentious.
+D 2025-11-13T09:03:48.460
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F ext/wasm/jaccwabyt/jaccwabyt.js 1e734c624205cdf621f322972dfb0fc8013d573a5882f57492a6830e5ec23e17
F ext/wasm/jaccwabyt/jaccwabyt.md 167fc0b624c9bc2c477846e336de9403842d81b1a24fc4d3b24317cb9eba734f
F ext/wasm/mkdist.sh 64d53f469c823ed311f6696f69cec9093f745e467334b34f5ceabdf9de3c5b28 x
-F ext/wasm/mkwasmbuilds.c 1b53c4d2a1350c19a96a8cdfbda6a39baea9d2142bfe0cbef0ccb0e898787f47
+F ext/wasm/mkwasmbuilds.c fd60b6390c71a0f3302c2255b677c2573c8ec10d551bd650732863275b819b9a
F ext/wasm/module-symbols.html e54f42112e0aac2a31f850ab33e7f2630a2ea4f63496f484a12469a2501e07e2
F ext/wasm/scratchpad-wasmfs.html a3d7388f3c4b263676b58b526846e9d02dfcb4014ff29d3a5040935286af5b96
F ext/wasm/scratchpad-wasmfs.mjs 66034b9256b218de59248aad796760a1584c1dd842231505895eff00dbd57c63
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 36cd33f634a45900f6e52ba07aa20242a5f2b29c7cbe19be968c52ffef34fcde
-R b697189ebe817c2d0222f56ac60e6cf8
+P 42f95ea71e5e7e927685de3a6da2ede38abe7cabdd1fc71b9a14bebe9f54a65e
+R efca346a3a96db0e5e0d3f79e1a32176
U stephan
-Z b922991610b2c43f75bf9d6db0a24f53
+Z 08c40facf4857ff967d7d59325efe464
# Remove this line to create a well-formed Fossil manifest.