MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / addMissingLibraryStubs

Function addMissingLibraryStubs

src/modules.mjs:454–463  ·  view source on GitHub ↗
(unusedLibSymbols)

Source from the content-addressed store, hash-verified

452// TODO(sbc): These errors could potentially be generated at build time via
453// some kind of acorn pass that searched for uses of these missing symbols.
454function addMissingLibraryStubs(unusedLibSymbols) {
455 let rtn = '';
456 rtn += 'var missingLibrarySymbols = [\n';
457 for (const sym of unusedLibSymbols) {
458 rtn += ` '${sym}',\n`;
459 }
460 rtn += '];\n';
461 rtn += 'missingLibrarySymbols.forEach(missingLibrarySymbol)\n';
462 return rtn;
463}
464
465function exportSymbol(name) {
466 // In MODULARIZE=instance mode symbols are exported by being included in

Callers 1

exportRuntimeSymbolsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected