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

Side by Side Diff: pydir/szbuild.py

Issue 1777103002: Eliminate all uses of 'le32-nacl-objcopy'. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 9 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/run-pnacl-sz.py ('k') | pydir/utils.py » ('j') | 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, FindBaseNaCl, get_sfi_string 9 from utils import FindBaseNaCl, GetObjcopyCmd, get_sfi_string, shellcmd
10 10
11 def NewerThanOrNotThere(old_path, new_path): 11 def NewerThanOrNotThere(old_path, new_path):
12 """Returns whether old_path is newer than new_path. 12 """Returns whether old_path is newer than new_path.
13 13
14 Also returns true if either path doesn't exist. 14 Also returns true if either path doesn't exist.
15 """ 15 """
16 if not (os.path.exists(old_path) and os.path.exists(new_path)): 16 if not (os.path.exists(old_path) and os.path.exists(new_path)):
17 return True 17 return True
18 return os.path.getmtime(old_path) > os.path.getmtime(new_path) 18 return os.path.getmtime(old_path) > os.path.getmtime(new_path)
19 19
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 sym_llc = pexe_base + '.sym.llc.txt' 286 sym_llc = pexe_base + '.sym.llc.txt'
287 sym_sz = pexe_base + '.sym.sz.txt' 287 sym_sz = pexe_base + '.sym.sz.txt'
288 sym_sz_unescaped = pexe_base_unescaped + '.sym.sz.txt' 288 sym_sz_unescaped = pexe_base_unescaped + '.sym.sz.txt'
289 whitelist_sz = pexe_base + '.wl.sz.txt' 289 whitelist_sz = pexe_base + '.wl.sz.txt'
290 whitelist_sz_unescaped = pexe_base_unescaped + '.wl.sz.txt' 290 whitelist_sz_unescaped = pexe_base_unescaped + '.wl.sz.txt'
291 pnacl_sz = ( 291 pnacl_sz = (
292 '{root}/toolchain_build/src/subzero/pnacl-sz' 292 '{root}/toolchain_build/src/subzero/pnacl-sz'
293 ).format(root=nacl_root) 293 ).format(root=nacl_root)
294 llcbin = '{base}/pnacl-llc'.format(base=path_addition) 294 llcbin = '{base}/pnacl-llc'.format(base=path_addition)
295 gold = '{base}/le32-nacl-ld.gold'.format(base=path_addition) 295 gold = '{base}/le32-nacl-ld.gold'.format(base=path_addition)
296 objcopy = '{base}/le32-nacl-objcopy'.format(base=path_addition) 296 objcopy = '{base}/{objcopy}'.format(base=path_addition,
297 objcopy=GetObjcopyCmd())
297 opt_level = args.optlevel 298 opt_level = args.optlevel
298 opt_level_map = { 'm1':'0', '-1':'0', '0':'0', '1':'1', '2':'2' } 299 opt_level_map = { 'm1':'0', '-1':'0', '0':'0', '1':'1', '2':'2' }
299 hybrid = args.include or args.exclude 300 hybrid = args.include or args.exclude
300 native = not args.sandbox and not args.nonsfi 301 native = not args.sandbox and not args.nonsfi
301 302
302 if hybrid and (args.force or 303 if hybrid and (args.force or
303 NewerThanOrNotThere(pexe, obj_llc) or 304 NewerThanOrNotThere(pexe, obj_llc) or
304 NewerThanOrNotThere(llcbin, obj_llc)): 305 NewerThanOrNotThere(llcbin, obj_llc)):
305 arch = { 306 arch = {
306 'arm32': 'arm' + get_sfi_string(args, 'v7', '-nonsfi', '-nonsfi'), 307 'arm32': 'arm' + get_sfi_string(args, 'v7', '-nonsfi', '-nonsfi'),
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 450
450 # Put the extra verbose printing at the end. 451 # Put the extra verbose printing at the end.
451 if args.verbose and hybrid: 452 if args.verbose and hybrid:
452 print 'include={regex}'.format(regex=re_include_str) 453 print 'include={regex}'.format(regex=re_include_str)
453 print 'exclude={regex}'.format(regex=re_exclude_str) 454 print 'exclude={regex}'.format(regex=re_exclude_str)
454 print 'default_match={dm}'.format(dm=default_match) 455 print 'default_match={dm}'.format(dm=default_match)
455 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms)) 456 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms))
456 457
457 if __name__ == '__main__': 458 if __name__ == '__main__':
458 main() 459 main()
OLDNEW
« no previous file with comments | « pydir/run-pnacl-sz.py ('k') | pydir/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698