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
()
| 213 | |
| 214 | |
| 215 | def 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') |
no outgoing calls
no test coverage detected