Chromium Code Reviews| Index: pydir/run-pnacl-sz.py |
| diff --git a/pydir/run-pnacl-sz.py b/pydir/run-pnacl-sz.py |
| index e15b0960114162262d5b30fcdf01b160ec4eb22c..f6de30290f5e80537c2f26fb4f69ff962838823b 100755 |
| --- a/pydir/run-pnacl-sz.py |
| +++ b/pydir/run-pnacl-sz.py |
| @@ -78,6 +78,10 @@ def main(): |
| argparser.add_argument('--echo-cmd', required=False, |
| action='store_true', |
| help='Trace command that generates ICE instructions') |
| + argparser.add_argument('--tbc', required=False, action='store_true', |
| + help='Input is textual bitcode (not .ll)') |
| + argparser.add_argument('--fail', required=False, action='store_true', |
|
Jim Stichnoth
2015/06/29 22:43:12
Bikeshedding: how about something like '--expect-f
Karl
2015/06/30 18:46:09
Done.
|
| + help='Negate success of run by using LLVM not') |
| argparser.add_argument('--args', '-a', nargs=argparse.REMAINDER, |
| default=[], |
| help='Remaining arguments are passed to pnacl-sz') |
| @@ -93,13 +97,24 @@ def main(): |
| raise RuntimeError("Can't specify both '--llvm-source' and " + |
| "'--no-local-syms'") |
| + if args.llvm_source and args.tbc: |
| + raise RuntimeError("Can't specify '--tbc' and '--llvm-source'") |
|
Jim Stichnoth
2015/06/29 22:43:12
"Can't specify both ..." for consistency?
Karl
2015/06/30 18:46:09
Done.
|
| + |
| + if args.llvm and args.tbc: |
| + raise RuntimeError("Can't specify '--tbc' and '--llvm'") |
| + |
| cmd = [] |
| - if not args.llvm_source: |
| + if args.tbc: |
| + cmd = [os.path.join(pnacl_bin_path, 'pnacl-bcfuzz'), llfile, |
| + '-bitcode-as-text', '-output', '-', '|'] |
| + elif not args.llvm_source: |
| cmd = [os.path.join(pnacl_bin_path, 'llvm-as'), llfile, '-o', '-', '|', |
| os.path.join(pnacl_bin_path, 'pnacl-freeze')] |
| if not args.no_local_syms: |
| cmd += ['--allow-local-symbol-tables'] |
| cmd += ['|'] |
| + if args.fail: |
| + cmd += [os.path.join(pnacl_bin_path, 'not')] |
| cmd += [args.pnacl_sz] |
| cmd += ['--target', args.target] |
| if args.insts: |