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

Side by Side Diff: pydir/szbuild.py

Issue 565553002: Subzero: Print defaults as appropriate in python script help text. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « pydir/crosstest.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python2 1 #!/usr/bin/env python2
2 2
3 import argparse 3 import argparse
4 import os 4 import os
5 import pipes 5 import pipes
6 import re 6 import re
7 import sys 7 import sys
8 8
9 from utils import shellcmd 9 from utils import shellcmd
10 from utils import FindBaseNaCl 10 from utils import FindBaseNaCl
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 argparser.add_argument('--include', '-i', default=[], dest='include', 101 argparser.add_argument('--include', '-i', default=[], dest='include',
102 action='append', 102 action='append',
103 help='Subzero symbols to include ' + 103 help='Subzero symbols to include ' +
104 '(regex or line range)') 104 '(regex or line range)')
105 argparser.add_argument('--exclude', '-e', default=[], dest='exclude', 105 argparser.add_argument('--exclude', '-e', default=[], dest='exclude',
106 action='append', 106 action='append',
107 help='Subzero symbols to exclude ' + 107 help='Subzero symbols to exclude ' +
108 '(regex or line range)') 108 '(regex or line range)')
109 argparser.add_argument('--output', '-o', default='a.out', dest='output', 109 argparser.add_argument('--output', '-o', default='a.out', dest='output',
110 action='store', 110 action='store',
111 help='Output executable (default a.out)') 111 help='Output executable. Default %(default)s.')
112 argparser.add_argument('-O', default='2', dest='optlevel', 112 argparser.add_argument('-O', default='2', dest='optlevel',
113 choices=['m1', '-1', '0', '1', '2'], 113 choices=['m1', '-1', '0', '1', '2'],
114 help='Optimization level ' + 114 help='Optimization level ' +
115 '(m1 and -1 are equivalent)') 115 '(m1 and -1 are equivalent).' +
116 ' Default %(default)s.')
116 argparser.add_argument('--verbose', '-v', dest='verbose', 117 argparser.add_argument('--verbose', '-v', dest='verbose',
117 action='store_true', 118 action='store_true',
118 help='Display some extra debugging output') 119 help='Display some extra debugging output')
119 args = argparser.parse_args() 120 args = argparser.parse_args()
120 121
121 pexe = args.pexe 122 pexe = args.pexe
122 [pexe_base, ext] = os.path.splitext(pexe) 123 [pexe_base, ext] = os.path.splitext(pexe)
123 if ext != '.pexe': 124 if ext != '.pexe':
124 pexe_base = pexe 125 pexe_base = pexe
125 pexe_base_unescaped = pexe_base 126 pexe_base_unescaped = pexe_base
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 # Put the extra verbose printing at the end. 231 # Put the extra verbose printing at the end.
231 if args.verbose: 232 if args.verbose:
232 print 'PATH={path}'.format(path=os.environ['PATH']) 233 print 'PATH={path}'.format(path=os.environ['PATH'])
233 print 'include={regex}'.format(regex=re_include_str) 234 print 'include={regex}'.format(regex=re_include_str)
234 print 'exclude={regex}'.format(regex=re_exclude_str) 235 print 'exclude={regex}'.format(regex=re_exclude_str)
235 print 'default_match={dm}'.format(dm=default_match) 236 print 'default_match={dm}'.format(dm=default_match)
236 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms)) 237 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms))
237 238
238 if __name__ == '__main__': 239 if __name__ == '__main__':
239 main() 240 main()
OLDNEW
« no previous file with comments | « pydir/crosstest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698