| OLD | NEW |
| 1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python2 |
| 2 | 2 |
| 3 import argparse | 3 import argparse |
| 4 import itertools | 4 import itertools |
| 5 import os | 5 import os |
| 6 import re | 6 import re |
| 7 import subprocess | 7 import subprocess |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 from utils import shellcmd | 10 from utils import shellcmd |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 if not args.no_local_syms: | 67 if not args.no_local_syms: |
| 68 cmd += ['--allow-local-symbol-tables'] | 68 cmd += ['--allow-local-symbol-tables'] |
| 69 cmd += ['|'] | 69 cmd += ['|'] |
| 70 cmd += [args.llvm2ice] | 70 cmd += [args.llvm2ice] |
| 71 if args.insts: | 71 if args.insts: |
| 72 cmd += ['-verbose', 'inst', '-notranslate'] | 72 cmd += ['-verbose', 'inst', '-notranslate'] |
| 73 if not args.llvm_source: | 73 if not args.llvm_source: |
| 74 cmd += ['--bitcode-format=pnacl'] | 74 cmd += ['--bitcode-format=pnacl'] |
| 75 if not args.no_local_syms: | 75 if not args.no_local_syms: |
| 76 cmd += ['--allow-local-symbol-tables'] | 76 cmd += ['--allow-local-symbol-tables'] |
| 77 if not (args.llvm or args.llvm_source): | 77 if args.llvm or args.llvm_source: |
| 78 cmd += ['--build-on-read'] | 78 cmd += ['--build-on-read=0'] |
| 79 else: |
| 80 cmd += ['--build-on-read=1'] |
| 79 if args.args: | 81 if args.args: |
| 80 cmd += args.args | 82 cmd += args.args |
| 81 if args.llvm_source: | 83 if args.llvm_source: |
| 82 cmd += [llfile] | 84 cmd += [llfile] |
| 83 | 85 |
| 84 stdout_result = shellcmd(cmd, echo=args.echo_cmd) | 86 stdout_result = shellcmd(cmd, echo=args.echo_cmd) |
| 85 if not args.echo_cmd: | 87 if not args.echo_cmd: |
| 86 sys.stdout.write(stdout_result) | 88 sys.stdout.write(stdout_result) |
| 87 | 89 |
| 88 if __name__ == '__main__': | 90 if __name__ == '__main__': |
| 89 main() | 91 main() |
| OLD | NEW |