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

Function generate_js_sym_info

tools/link.py:215–226  ·  view source on GitHub ↗

Run the JS compiler to generate a list of all available JS symbols. This must be done separately for each linker invocation since the list of symbols depends on what settings are used. TODO(sbc): Find a way to optimize this. Potentially we could add a super-set mode of the JS compiler that

()

Source from the content-addressed store, hash-verified

213
214
215def generate_js_sym_info():
216 """Run the JS compiler to generate a list of all available JS symbols.
217
218 This must be done separately for each linker invocation since the list of
219 symbols depends on what settings are used.
220 TODO(sbc): Find a way to optimize this. Potentially we could add a super-set
221 mode of the JS compiler that would generate a list of all possible symbols
222 that could be checked in.
223 """
224 output = emscripten.compile_javascript(symbols_only=True)
225 # When running in symbols_only mode compiler.mjs outputs symbol metadata as JSON.
226 return json.loads(output)
227
228
229@ToolchainProfiler.profile_block('JS symbol generation')

Callers 2

get_js_sym_infoFunction · 0.85
generate_jsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected