Chromium Code Reviews

Side by Side Diff: pydir/szbuild.py

Issue 1410813004: Subzero: Add a missing absolute path to llvm-mc command. (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.
Jump to:
View unified diff |
« no previous file with comments | « no previous file | 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 221 matching lines...)
232 args.sz_args + 232 args.sz_args +
233 [pexe], 233 [pexe],
234 echo=args.verbose) 234 echo=args.verbose)
235 if args.filetype != 'obj': 235 if args.filetype != 'obj':
236 triple = { 236 triple = {
237 'arm32': 'arm-nacl' if args.sandbox else 'arm', 237 'arm32': 'arm-nacl' if args.sandbox else 'arm',
238 'x8632': 'i686-nacl' if args.sandbox else 'i686', 238 'x8632': 'i686-nacl' if args.sandbox else 'i686',
239 }[args.target] 239 }[args.target]
240 240
241 shellcmd(( 241 shellcmd((
242 'llvm-mc -triple={triple} -filetype=obj -o {obj} {asm}' 242 '{base}/llvm-mc -triple={triple} -filetype=obj -o {obj} {asm}'
243 ).format(asm=asm_sz, obj=obj_sz, triple=triple), 243 ).format(base=path_addition, asm=asm_sz, obj=obj_sz,
244 triple=triple),
244 echo=args.verbose) 245 echo=args.verbose)
245 if not args.sandbox: 246 if not args.sandbox:
246 shellcmd(( 247 shellcmd((
247 '{objcopy} --redefine-sym _start=_user_start {obj}' 248 '{objcopy} --redefine-sym _start=_user_start {obj}'
248 ).format(objcopy=objcopy, obj=obj_sz), echo=args.verbose) 249 ).format(objcopy=objcopy, obj=obj_sz), echo=args.verbose)
249 if hybrid: 250 if hybrid:
250 shellcmd(( 251 shellcmd((
251 'nm {obj} | sed -n "s/.* [a-zA-Z] //p" > {sym}' 252 'nm {obj} | sed -n "s/.* [a-zA-Z] //p" > {sym}'
252 ).format(obj=obj_sz, sym=sym_sz), echo=args.verbose) 253 ).format(obj=obj_sz, sym=sym_sz), echo=args.verbose)
253 254
(...skipping 111 matching lines...)
365 366
366 # Put the extra verbose printing at the end. 367 # Put the extra verbose printing at the end.
367 if args.verbose and hybrid: 368 if args.verbose and hybrid:
368 print 'include={regex}'.format(regex=re_include_str) 369 print 'include={regex}'.format(regex=re_include_str)
369 print 'exclude={regex}'.format(regex=re_exclude_str) 370 print 'exclude={regex}'.format(regex=re_exclude_str)
370 print 'default_match={dm}'.format(dm=default_match) 371 print 'default_match={dm}'.format(dm=default_match)
371 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms)) 372 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms))
372 373
373 if __name__ == '__main__': 374 if __name__ == '__main__':
374 main() 375 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine