mirror of https://github.com/pyodide/pyodide.git
Add a few things to EXPORTED_RUNTIME_METHODS (#4201)
Instead of patching them in `pre.js`
This commit is contained in:
parent
aaab6a86d5
commit
bb645ca9b4
|
@ -121,7 +121,7 @@ export MAIN_MODULE_LDFLAGS= $(LDFLAGS_BASE) \
|
|||
-s EXPORT_NAME="'_createPyodideModule'" \
|
||||
-s EXPORT_EXCEPTION_HANDLING_HELPERS \
|
||||
-s EXCEPTION_CATCHING_ALLOWED=['we only want to allow exception handling in side modules'] \
|
||||
-sEXPORTED_RUNTIME_METHODS='stackAlloc,stackRestore,stackSave' \
|
||||
-sEXPORTED_RUNTIME_METHODS='wasmTable,ERRNO_CODES' \
|
||||
-s DEMANGLE_SUPPORT=1 \
|
||||
-s USE_ZLIB \
|
||||
-s USE_BZIP2 \
|
||||
|
|
|
@ -39,17 +39,11 @@ static struct PyModuleDef core_module_def = {
|
|||
.m_size = -1,
|
||||
};
|
||||
|
||||
EM_JS_DEPS(pyodide_core_deps, "stackAlloc,stackRestore,stackSave");
|
||||
PyObject*
|
||||
PyInit__pyodide_core(void)
|
||||
{
|
||||
EM_ASM({
|
||||
// Emscripten doesn't make UTF8ToString or wasmTable available on Module by
|
||||
// default...
|
||||
Module.UTF8ToString = UTF8ToString;
|
||||
Module.wasmTable = wasmTable;
|
||||
// Emscripten has a bug where it accidentally exposes an empty object as
|
||||
// Module.ERRNO_CODES
|
||||
Module.ERRNO_CODES = ERRNO_CODES;
|
||||
// sourmash needs open64 to mean the same thing as open.
|
||||
// Emscripten 3.1.44 seems to have removed it??
|
||||
wasmImports["open64"] = wasmImports["open"];
|
||||
|
|
Loading…
Reference in New Issue