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

Function unexportedRuntimeSymbol

src/runtime_debug.js:164–188  ·  view source on GitHub ↗
(sym)

Source from the content-addressed store, hash-verified

162}
163
164function unexportedRuntimeSymbol(sym) {
165#if PTHREADS
166 if (ENVIRONMENT_IS_PTHREAD) {
167 return;
168 }
169#endif
170 if (!Object.getOwnPropertyDescriptor(Module, sym)) {
171 Object.defineProperty(Module, sym, {
172 configurable: true,
173 get() {
174 var msg = `'${sym}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;
175 if (isExportedByForceFilesystem(sym)) {
176 msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you';
177 }
178 abort(msg);
179 },
180#if !DECLARE_ASM_MODULE_EXPORTS
181 // !DECLARE_ASM_MODULE_EXPORTS programmatically exports all wasm symbols
182 // on the Module object. Ignore these attempts to set the properties
183 // here.
184 set(value) {}
185#endif
186 });
187 }
188}
189
190#if WASM_WORKERS || PTHREADS
191/**

Callers 1

missingLibrarySymbolFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected