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

Unified Diff: pydir/szbuild.py

Issue 920953002: Subzero: Use -filetype instead of -ias and -elf-writer. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Explicitly set the output file type for unit tests 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 | « README.rst ('k') | src/IceClFlags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pydir/szbuild.py
diff --git a/pydir/szbuild.py b/pydir/szbuild.py
index 7fcb924514616e59c0b7e64e57d3b9fba0013691..8a72fd67d3d1c575b0fab2819fbd374b6d6185a9 100755
--- a/pydir/szbuild.py
+++ b/pydir/szbuild.py
@@ -80,9 +80,9 @@ def AddOptionalArgs(argparser):
help='Optimization level ' +
'(m1 and -1 are equivalent).' +
' Default %(default)s.')
- argparser.add_argument('--elf', dest='elf',
- action='store_true',
- help='Directly generate ELF output')
+ argparser.add_argument('--filetype', default='iasm', dest='filetype',
+ choices=['obj', 'asm', 'iasm'],
+ help='Output file type. Default %(default)s.')
argparser.add_argument('--verbose', '-v', dest='verbose',
action='store_true',
help='Display some extra debugging output')
@@ -205,15 +205,15 @@ def ProcessPexe(args, pexe, exe):
shellcmd([llvm2ice,
'-O' + opt_level,
'-bitcode-format=pnacl',
- '-o', obj_sz if args.elf else asm_sz] +
+ '-filetype=' + args.filetype,
+ '-o', obj_sz if args.filetype == 'obj' else asm_sz] +
(['-externalize',
'-ffunction-sections',
'-fdata-sections'] if hybrid else []) +
- (['-elf-writer'] if args.elf else []) +
args.sz_args +
[pexe],
echo=args.verbose)
- if not args.elf:
+ if args.filetype != 'obj':
shellcmd((
'llvm-mc -arch=x86 -filetype=obj -o {obj} {asm}'
).format(asm=asm_sz, obj=obj_sz), echo=args.verbose)
« no previous file with comments | « README.rst ('k') | src/IceClFlags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698