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

Side by Side Diff: pydir/szbuild.py

Issue 695993004: Subzero: Switch to AT&T asm syntax. I give up. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 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 unified diff | Download patch
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 '-O' + opt_level, 195 '-O' + opt_level,
196 '-bitcode-format=pnacl', 196 '-bitcode-format=pnacl',
197 '-externalize', 197 '-externalize',
198 '-ffunction-sections', 198 '-ffunction-sections',
199 '-fdata-sections', 199 '-fdata-sections',
200 '-o', asm_sz] + 200 '-o', asm_sz] +
201 args.sz_args + 201 args.sz_args +
202 [pexe], 202 [pexe],
203 echo=args.verbose) 203 echo=args.verbose)
204 shellcmd(( 204 shellcmd((
205 'llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj -o {obj} ' + 205 'llvm-mc -arch=x86 -filetype=obj -o {obj} ' +
206 '{asm}' 206 '{asm}'
207 ).format(asm=asm_sz, obj=obj_sz), echo=args.verbose) 207 ).format(asm=asm_sz, obj=obj_sz), echo=args.verbose)
208 shellcmd(( 208 shellcmd((
209 'objcopy --redefine-sym _start=_user_start {obj}' 209 'objcopy --redefine-sym _start=_user_start {obj}'
210 ).format(obj=obj_sz), echo=args.verbose) 210 ).format(obj=obj_sz), echo=args.verbose)
211 shellcmd(( 211 shellcmd((
212 'nm {obj} | sed -n "s/.* [a-zA-Z] //p" > {sym}' 212 'nm {obj} | sed -n "s/.* [a-zA-Z] //p" > {sym}'
213 ).format(obj=obj_sz, sym=sym_sz), echo=args.verbose) 213 ).format(obj=obj_sz, sym=sym_sz), echo=args.verbose)
214 214
215 with open(sym_sz_unescaped) as f: 215 with open(sym_sz_unescaped) as f:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 # Put the extra verbose printing at the end. 270 # Put the extra verbose printing at the end.
271 if args.verbose: 271 if args.verbose:
272 print 'PATH={path}'.format(path=os.environ['PATH']) 272 print 'PATH={path}'.format(path=os.environ['PATH'])
273 print 'include={regex}'.format(regex=re_include_str) 273 print 'include={regex}'.format(regex=re_include_str)
274 print 'exclude={regex}'.format(regex=re_exclude_str) 274 print 'exclude={regex}'.format(regex=re_exclude_str)
275 print 'default_match={dm}'.format(dm=default_match) 275 print 'default_match={dm}'.format(dm=default_match)
276 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms)) 276 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms))
277 277
278 if __name__ == '__main__': 278 if __name__ == '__main__':
279 main() 279 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698