(infile, outfile, modify_wasm, args)
| 478 | |
| 479 | @ToolchainProfiler.profile() |
| 480 | def get_metadata(infile, outfile, modify_wasm, args): |
| 481 | metadata = extract_metadata.extract_metadata(infile) |
| 482 | if modify_wasm: |
| 483 | # In some cases we still need to modify the wasm file |
| 484 | # using wasm-emscripten-finalize. |
| 485 | building.run_binaryen_command('wasm-emscripten-finalize', |
| 486 | infile=infile, |
| 487 | outfile=outfile, |
| 488 | args=args) |
| 489 | # When we do this we can generate new imports, so |
| 490 | # re-read parts of the metadata post-finalize |
| 491 | extract_metadata.update_metadata(outfile, metadata) |
| 492 | if DEBUG: |
| 493 | logger.debug("Metadata: " + pprint.pformat(metadata.__dict__)) |
| 494 | return metadata |
| 495 | |
| 496 | |
| 497 | def finalize_wasm(infile, outfile, js_syms): |
no outgoing calls
no test coverage detected