Index: pydir/run-llvm2ice.py |
diff --git a/pydir/run-llvm2ice.py b/pydir/run-llvm2ice.py |
index 382467349861e675895f9efba867d06e13d7831a..d9f3c6312f23fe49215923e6d2f168dafaa58b67 100755 |
--- a/pydir/run-llvm2ice.py |
+++ b/pydir/run-llvm2ice.py |
@@ -47,6 +47,7 @@ def main(): |
action='store_true', |
help='Trace command that generates ICE instructions') |
argparser.add_argument('--args', '-a', nargs=argparse.REMAINDER, |
+ default=[], |
help='Remaining arguments are passed to llvm2ice') |
args = argparser.parse_args() |
@@ -60,6 +61,13 @@ def main(): |
raise RuntimeError("Can't specify both '--llvm-source' and " + |
"'--no-local-syms'") |
+ if '-noIRgen' in args.args or '--noIRgen' in args.args: |
jvoung (off chromium)
2014/11/05 23:55:08
Is it possible to do:
%if ... --command %p2i ...
Karl
2014/11/06 17:06:10
Done and Done.
|
+ # Short circuit if not allowed by llvm2ice |
+ atts_cmd = [args.llvm2ice, '--build-atts'] |
+ build_atts = shellcmd(atts_cmd, echo=False).split() |
+ if 'no_disable_ir_gen' in build_atts: |
+ return |
+ |
cmd = [] |
if not args.llvm_source: |
cmd = [os.path.join(llvm_bin_path, 'llvm-as'), llfile, '-o', '-', '|', |
@@ -78,8 +86,7 @@ def main(): |
cmd += ['--build-on-read=0'] |
else: |
cmd += ['--build-on-read=1'] |
- if args.args: |
- cmd += args.args |
+ cmd += args.args |
if args.llvm_source: |
cmd += [llfile] |