mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
wasm: when building in -O0 mode (typical dev mode), use -sASSERTIONS=2, else -sASSERTIONS=0, in response [7e3e35cbff
|Emscripten checkin 7e3e35cbff9], which adds assertions to check for the condition reported in [https://github.com/emscripten-core/emscripten/issues/23420|Emscripten ticket 23420]. Update some unrelated JS-side internal docs.
FossilOrigin-Name: 1f554610ba5d9d474ec4570bb7ca09125fd2cdfb4976530a4227cc6ebdf3a962
This commit is contained in:
@ -619,6 +619,12 @@ emcc.exportedRuntimeMethods := \
|
||||
emcc.jsflags += $(emcc.exportedRuntimeMethods)
|
||||
emcc.jsflags += -sUSE_CLOSURE_COMPILER=0
|
||||
emcc.jsflags += -sIMPORTED_MEMORY
|
||||
ifeq (,$(filter -O0,$(emcc_opt)))
|
||||
emcc.assert ?= 0
|
||||
else
|
||||
emcc.assert ?= 2
|
||||
endif
|
||||
emcc.jsflags += -sASSERTIONS=$(emcc.assert)
|
||||
emcc.jsflags += -sSTRICT_JS=0
|
||||
# STRICT_JS disabled due to:
|
||||
# https://github.com/emscripten-core/emscripten/issues/18610
|
||||
|
@ -8,16 +8,16 @@
|
||||
point the sqlite3 JS API bits will get set up.
|
||||
*/
|
||||
Module.runSQLite3PostLoadInit = function(EmscriptenModule/*the Emscripten-style module object*/){
|
||||
/** ^^^ As don't use Module.postRun, as that runs a different time
|
||||
/** ^^^ Don't use Module.postRun, as that runs a different time
|
||||
depending on whether this file is built with emcc 3.1.x or
|
||||
4.0.x. This function name is intentionally obnoxiously verbose to
|
||||
ensure that we don't collide with current and future Emscripten
|
||||
symbol names. */
|
||||
'use strict';
|
||||
//console.warn("This is the start of the Module.postRun handler.");
|
||||
//console.warn("This is the start of Module.runSQLite3PostLoadInit()");
|
||||
/* This function will contain at least the following:
|
||||
|
||||
- post-js-header.js (this file)
|
||||
- post-js-header.js => this file
|
||||
- sqlite3-api-prologue.js => Bootstrapping bits to attach the rest to
|
||||
- common/whwasmutil.js => Replacements for much of Emscripten's glue
|
||||
- jaccwabyt/jaccwabyt.js => Jaccwabyt (C/JS struct binding)
|
||||
@ -26,8 +26,8 @@ Module.runSQLite3PostLoadInit = function(EmscriptenModule/*the Emscripten-style
|
||||
- sqlite3-api-worker1.js => Worker-based API
|
||||
- sqlite3-vfs-helper.c-pp.js => Utilities for VFS impls
|
||||
- sqlite3-vtab-helper.c-pp.js => Utilities for virtual table impls
|
||||
- sqlite3-vfs-opfs.c-pp.js => OPFS VFS
|
||||
- sqlite3-vfs-opfs.c-pp.js => OPFS VFS
|
||||
- sqlite3-vfs-opfs-sahpool.c-pp.js => OPFS SAHPool VFS
|
||||
- sqlite3-api-cleanup.js => final API cleanup
|
||||
- post-js-footer.js => closes this postRun() function
|
||||
- post-js-footer.js => closes this function
|
||||
*/
|
||||
|
@ -12,12 +12,12 @@
|
||||
|
||||
This file is intended to be combined at build-time with other
|
||||
related code, most notably a header and footer which wraps this
|
||||
whole file into an Emscripten Module.postRun()-style handler. The
|
||||
sqlite3 JS API has no hard requirements on Emscripten and does not
|
||||
expose any Emscripten APIs to clients. It is structured such that
|
||||
its build can be tweaked to include it in arbitrary WASM
|
||||
environments which can supply the necessary underlying features
|
||||
(e.g. a POSIX file I/O layer).
|
||||
whole file into a single callback which can be run after Emscripten
|
||||
loads the corresponding WASM module. The sqlite3 JS API has no hard
|
||||
requirements on Emscripten and does not expose any Emscripten APIs
|
||||
to clients. It is structured such that its build can be tweaked to
|
||||
include it in arbitrary WASM environments which can supply the
|
||||
necessary underlying features (e.g. a POSIX file I/O layer).
|
||||
|
||||
Main project home page: https://sqlite.org
|
||||
|
||||
|
Reference in New Issue
Block a user