| OLD | NEW |
| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 obj_sz_weak = pexe_base + '.weak.sz.o' | 165 obj_sz_weak = pexe_base + '.weak.sz.o' |
| 166 obj_partial = obj_sz # overridden for hybrid mode | 166 obj_partial = obj_sz # overridden for hybrid mode |
| 167 sym_llc = pexe_base + '.sym.llc.txt' | 167 sym_llc = pexe_base + '.sym.llc.txt' |
| 168 sym_sz = pexe_base + '.sym.sz.txt' | 168 sym_sz = pexe_base + '.sym.sz.txt' |
| 169 sym_sz_unescaped = pexe_base_unescaped + '.sym.sz.txt' | 169 sym_sz_unescaped = pexe_base_unescaped + '.sym.sz.txt' |
| 170 whitelist_sz = pexe_base + '.wl.sz.txt' | 170 whitelist_sz = pexe_base + '.wl.sz.txt' |
| 171 whitelist_sz_unescaped = pexe_base_unescaped + '.wl.sz.txt' | 171 whitelist_sz_unescaped = pexe_base_unescaped + '.wl.sz.txt' |
| 172 pnacl_sz = ( | 172 pnacl_sz = ( |
| 173 '{root}/toolchain_build/src/subzero/pnacl-sz' | 173 '{root}/toolchain_build/src/subzero/pnacl-sz' |
| 174 ).format(root=nacl_root) | 174 ).format(root=nacl_root) |
| 175 llcbin = 'llc' | 175 llcbin = '{base}/pnacl-llc'.format(base=path_addition) |
| 176 gold = 'le32-nacl-ld.gold' | 176 gold = 'le32-nacl-ld.gold' |
| 177 opt_level = args.optlevel | 177 opt_level = args.optlevel |
| 178 opt_level_map = { 'm1':'0', '-1':'0', '0':'0', '1':'1', '2':'2' } | 178 opt_level_map = { 'm1':'0', '-1':'0', '0':'0', '1':'1', '2':'2' } |
| 179 hybrid = args.include or args.exclude | 179 hybrid = args.include or args.exclude |
| 180 | 180 |
| 181 if hybrid and (args.force or | 181 if hybrid and (args.force or |
| 182 NewerThanOrNotThere(pexe, obj_llc) or | 182 NewerThanOrNotThere(pexe, obj_llc) or |
| 183 NewerThanOrNotThere(llcbin, obj_llc)): | 183 NewerThanOrNotThere(llcbin, obj_llc)): |
| 184 # Only run pnacl-translate in hybrid mode. | 184 # Only run pnacl-translate in hybrid mode. |
| 185 shellcmd(['pnacl-translate', | 185 shellcmd(['pnacl-translate', |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 if args.verbose: | 319 if args.verbose: |
| 320 print 'PATH: {path}'.format(path=path_addition) | 320 print 'PATH: {path}'.format(path=path_addition) |
| 321 if hybrid: | 321 if hybrid: |
| 322 print 'include={regex}'.format(regex=re_include_str) | 322 print 'include={regex}'.format(regex=re_include_str) |
| 323 print 'exclude={regex}'.format(regex=re_exclude_str) | 323 print 'exclude={regex}'.format(regex=re_exclude_str) |
| 324 print 'default_match={dm}'.format(dm=default_match) | 324 print 'default_match={dm}'.format(dm=default_match) |
| 325 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms)) | 325 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms)) |
| 326 | 326 |
| 327 if __name__ == '__main__': | 327 if __name__ == '__main__': |
| 328 main() | 328 main() |
| OLD | NEW |