()
| 18 | |
| 19 | |
| 20 | def run(): |
| 21 | llvm_strip = shared.llvm_tool_path('llvm-strip') |
| 22 | new_args = [] |
| 23 | for arg in sys.argv[1:]: |
| 24 | base, ext = os.path.splitext(arg) |
| 25 | if ext == '.js' and os.path.isfile(arg): |
| 26 | wasm_file = base + '.wasm' |
| 27 | if os.path.isfile(wasm_file): |
| 28 | new_args.append(wasm_file) |
| 29 | continue |
| 30 | new_args.append(arg) |
| 31 | |
| 32 | shared.exec_process([llvm_strip, *new_args]) |
| 33 | |
| 34 | |
| 35 | if __name__ == '__main__': |