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

Unified Diff: pydir/szbuild.py

Issue 1417003005: Subzero: Add "szbuild.py --no-sz" arg for suppressing the pnacl-sz run. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 1 month 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 | no next file » | 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 684403822c429abe78a3a3a047400176af08513a..569c8caa64b3da9c5c47e62725df97cd070e40b1 100755
--- a/pydir/szbuild.py
+++ b/pydir/szbuild.py
@@ -98,6 +98,8 @@ def AddOptionalArgs(argparser):
help='Extra arguments for Subzero')
argparser.add_argument('--llc', dest='llc_args', action='append',
default=[], help='Extra arguments for llc')
+ argparser.add_argument('--no-sz', dest='nosz', action='store_true',
+ help='Run only post-Subzero build steps')
def main():
"""Create a hybrid translation from Subzero and llc.
@@ -216,22 +218,24 @@ def ProcessPexe(args, pexe, exe):
if (args.force or
NewerThanOrNotThere(pexe, obj_sz) or
NewerThanOrNotThere(pnacl_sz, obj_sz)):
- # Run pnacl-sz regardless of hybrid mode.
- shellcmd([pnacl_sz,
- '-O' + opt_level,
- '-bitcode-format=pnacl',
- '-filetype=' + args.filetype,
- '-o', obj_sz if args.filetype == 'obj' else asm_sz,
- '-target=' + args.target] +
- (['-externalize',
- '-ffunction-sections',
- '-fdata-sections'] if hybrid else []) +
- (['-sandbox'] if args.sandbox else []) +
- (['-enable-block-profile'] if
- args.enable_block_profile and not args.sandbox else []) +
- args.sz_args +
- [pexe],
- echo=args.verbose)
+ if not args.nosz:
+ # Run pnacl-sz regardless of hybrid mode.
+ shellcmd([pnacl_sz,
+ '-O' + opt_level,
+ '-bitcode-format=pnacl',
+ '-filetype=' + args.filetype,
+ '-o', obj_sz if args.filetype == 'obj' else asm_sz,
+ '-target=' + args.target] +
+ (['-externalize',
+ '-ffunction-sections',
+ '-fdata-sections'] if hybrid else []) +
+ (['-sandbox'] if args.sandbox else []) +
+ (['-enable-block-profile'] if
+ args.enable_block_profile and not args.sandbox
+ else []) +
+ args.sz_args +
+ [pexe],
+ echo=args.verbose)
if args.filetype != 'obj':
triple = {
'arm32': 'arm-nacl' if args.sandbox else 'arm',
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698