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

Side by Side Diff: llvm2iceinsts.py

Issue 317963002: Make py import not assume dir is "pnacl-subzero". Avoid autovect in crosstest. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: no need for disable-opt Created 6 years, 6 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 | « no previous file | pydir/build-pnacl-ir.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 for p in sys.path: 10 sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'pydir'))
11 if p.endswith('/toolchain_build/src/pnacl-subzero'):
12 sys.path.insert(0, p + '/pydir')
13 break
14 11
15 from utils import shellcmd 12 from utils import shellcmd
16 13
17 if __name__ == '__main__': 14 if __name__ == '__main__':
18 desc = 'Run llvm2ice on llvm file to produce ICE instructions.' 15 desc = 'Run llvm2ice on llvm file to produce ICE instructions.'
19 argparser = argparse.ArgumentParser( 16 argparser = argparse.ArgumentParser(
20 description=desc, 17 description=desc,
21 formatter_class=argparse.ArgumentDefaultsHelpFormatter, 18 formatter_class=argparse.ArgumentDefaultsHelpFormatter,
22 epilog=''' 19 epilog='''
23 Runs in two modes, depending on whether the flag '--pnacl' is specified. 20 Runs in two modes, depending on whether the flag '--pnacl' is specified.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 '--allow-local-symbol-tables', '|'] 56 '--allow-local-symbol-tables', '|']
60 cmd += [args.llvm2ice, '-verbose', 'inst', '-notranslate'] 57 cmd += [args.llvm2ice, '-verbose', 'inst', '-notranslate']
61 if args.pnacl: 58 if args.pnacl:
62 cmd += ['--allow-local-symbol-tables', '--bitcode-format=pnacl'] 59 cmd += ['--allow-local-symbol-tables', '--bitcode-format=pnacl']
63 else: 60 else:
64 cmd.append(llfile) 61 cmd.append(llfile)
65 62
66 stdout_result = shellcmd(cmd, echo=args.echo_cmd) 63 stdout_result = shellcmd(cmd, echo=args.echo_cmd)
67 if not args.echo_cmd: 64 if not args.echo_cmd:
68 sys.stdout.write(stdout_result) 65 sys.stdout.write(stdout_result)
OLDNEW
« no previous file with comments | « no previous file | pydir/build-pnacl-ir.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698