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

Unified Diff: pydir/run-llvm2ice.py

Issue 952993006: Omit textual emitConstPool in MINIMAL build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: line wrap Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pydir/run-llvm2ice.py
diff --git a/pydir/run-llvm2ice.py b/pydir/run-llvm2ice.py
index d622e7f32b04b538775f2edef6db25906df4f793..31535b85a900b1bf8d242ddbd04f558dcfd15b53 100755
--- a/pydir/run-llvm2ice.py
+++ b/pydir/run-llvm2ice.py
@@ -56,6 +56,9 @@ def main():
argparser.add_argument('--dis-flags', required=False,
action='append', default=[],
help='Add a disassembler flag')
+ argparser.add_argument('--filetype', default='iasm', dest='filetype',
+ choices=['obj', 'asm', 'iasm'],
+ help='Output file type. Default %(default)s.')
argparser.add_argument('--echo-cmd', required=False,
action='store_true',
help='Trace command that generates ICE instructions')
@@ -96,6 +99,7 @@ def main():
cmd += ['--build-on-read=0']
else:
cmd += ['--build-on-read=1']
+ cmd += ['--filetype=' + args.filetype]
cmd += args.args
if args.llvm_source:
cmd += [llfile]
@@ -106,10 +110,12 @@ def main():
# and instead manually delete.
asm_temp = tempfile.NamedTemporaryFile(delete=False)
asm_temp.close()
- if args.assemble:
+ if args.assemble and args.filetype != 'obj':
cmd += ['|', os.path.join(llvm_bin_path, 'llvm-mc'),
'-triple=i686-none-nacl',
'-filetype=obj', '-o', asm_temp.name]
+ elif asm_temp:
+ cmd += ['-o', asm_temp.name]
if args.disassemble:
# Show wide instruction encodings, diassemble, and show relocs.
cmd += (['&&', os.path.join(binutils_bin_path, 'objdump')] +
« no previous file with comments | « no previous file | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698