Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: pydir/llvm2iceinsts.py

Issue 554013002: Subzero: Move python scripts into a common pydir. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pydir/crosstest.py ('k') | pydir/szdiff.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'pydir'))
11
12 from utils import shellcmd 10 from utils import shellcmd
13 11
14 if __name__ == '__main__': 12 if __name__ == '__main__':
15 desc = 'Run llvm2ice on llvm file to produce ICE instructions.' 13 desc = 'Run llvm2ice on llvm file to produce ICE instructions.'
16 argparser = argparse.ArgumentParser( 14 argparser = argparse.ArgumentParser(
17 description=desc, 15 description=desc,
18 formatter_class=argparse.ArgumentDefaultsHelpFormatter, 16 formatter_class=argparse.ArgumentDefaultsHelpFormatter,
19 epilog=''' 17 epilog='''
20 Runs in two modes, depending on whether the flag '--pnacl' is specified. 18 Runs in two modes, depending on whether the flag '--pnacl' is specified.
21 19
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 '--allow-local-symbol-tables', '|'] 54 '--allow-local-symbol-tables', '|']
57 cmd += [args.llvm2ice, '-verbose', 'inst', '-notranslate'] 55 cmd += [args.llvm2ice, '-verbose', 'inst', '-notranslate']
58 if args.pnacl: 56 if args.pnacl:
59 cmd += ['--allow-local-symbol-tables', '--bitcode-format=pnacl'] 57 cmd += ['--allow-local-symbol-tables', '--bitcode-format=pnacl']
60 else: 58 else:
61 cmd.append(llfile) 59 cmd.append(llfile)
62 60
63 stdout_result = shellcmd(cmd, echo=args.echo_cmd) 61 stdout_result = shellcmd(cmd, echo=args.echo_cmd)
64 if not args.echo_cmd: 62 if not args.echo_cmd:
65 sys.stdout.write(stdout_result) 63 sys.stdout.write(stdout_result)
OLDNEW
« no previous file with comments | « pydir/crosstest.py ('k') | pydir/szdiff.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698