Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/lib/libcore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1632,16 +1632,13 @@ addToLibrary({
dynCalls[name.substr(8)] = exportedSymbol;
}
#endif
// Globals are currently statically enumerated into the output JS.
// TODO: If the number of Globals grows large, consider giving them a
// similar DECLARE_ASM_MODULE_EXPORTS = 0 treatment.
if (typeof exportedSymbol.value === 'undefined') {
// Export all symbols (both functions and globals) to the global scope
// when DECLARE_ASM_MODULE_EXPORTS=0
#if MINIMAL_RUNTIME
globalThis[name] = exportedSymbol;
globalThis[name] = exportedSymbol;
#else
globalThis[name] = Module[name] = exportedSymbol;
globalThis[name] = Module[name] = exportedSymbol;
#endif
}
}
exportAliases(wasmExports);
},
Expand Down
1 change: 0 additions & 1 deletion test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -9711,7 +9711,6 @@ def test_externref_emjs(self, dynlink):
'dylink': [True],
})
@no_esm_integration('https://github.com/emscripten-core/emscripten/issues/25543')
@no_omit_asm_module_exports('https://github.com/emscripten-core/emscripten/issues/25556')
def test_wasm_global(self, dynlink):
if '-flto' in self.cflags or '-flto=thin' in self.cflags:
self.skipTest('https://github.com/emscripten-core/emscripten/issues/25555')
Expand Down