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

Side by Side Diff: pydir/szbuild.py

Issue 1275983003: Subzero: Fix szbuild.py linking. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 4 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 | « 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 obj_partial = pexe_base + '.o' 279 obj_partial = pexe_base + '.o'
280 shellcmd(( 280 shellcmd((
281 'ld -r -m elf_i386 -o {partial} {sz} {llc}' 281 'ld -r -m elf_i386 -o {partial} {sz} {llc}'
282 ).format(partial=obj_partial, sz=obj_sz_weak, llc=obj_llc_weak), 282 ).format(partial=obj_partial, sz=obj_sz_weak, llc=obj_llc_weak),
283 echo=args.verbose) 283 echo=args.verbose)
284 shellcmd(( 284 shellcmd((
285 '{objcopy} -w --localize-symbol="*" {partial}' 285 '{objcopy} -w --localize-symbol="*" {partial}'
286 ).format(objcopy=objcopy, partial=obj_partial), 286 ).format(objcopy=objcopy, partial=obj_partial),
287 echo=args.verbose) 287 echo=args.verbose)
288 shellcmd(( 288 shellcmd((
289 '{objcopy} --globalize-symbol={start} {partial}' 289 '{objcopy} --globalize-symbol={start} ' +
290 '--globalize-symbol=__Sz_block_profile_info {partial}'
290 ).format(objcopy=objcopy, partial=obj_partial, 291 ).format(objcopy=objcopy, partial=obj_partial,
291 start='_start' if args.sandbox else '_user_start'), 292 start='_start' if args.sandbox else '_user_start'),
292 echo=args.verbose) 293 echo=args.verbose)
293 294
294 # Run the linker regardless of hybrid mode. 295 # Run the linker regardless of hybrid mode.
295 linker = ( 296 linker = (
296 '{root}/../third_party/llvm-build/Release+Asserts/bin/clang' 297 '{root}/../third_party/llvm-build/Release+Asserts/bin/clang'
297 ).format(root=nacl_root) 298 ).format(root=nacl_root)
298 if args.sandbox: 299 if args.sandbox:
299 linklib = ('{root}/toolchain/linux_x86/pnacl_newlib_raw/translator/' + 300 linklib = ('{root}/toolchain/linux_x86/pnacl_newlib_raw/translator/' +
(...skipping 30 matching lines...) Expand all
330 if args.verbose: 331 if args.verbose:
331 print 'PATH: {path}'.format(path=path_addition) 332 print 'PATH: {path}'.format(path=path_addition)
332 if hybrid: 333 if hybrid:
333 print 'include={regex}'.format(regex=re_include_str) 334 print 'include={regex}'.format(regex=re_include_str)
334 print 'exclude={regex}'.format(regex=re_exclude_str) 335 print 'exclude={regex}'.format(regex=re_exclude_str)
335 print 'default_match={dm}'.format(dm=default_match) 336 print 'default_match={dm}'.format(dm=default_match)
336 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms)) 337 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms))
337 338
338 if __name__ == '__main__': 339 if __name__ == '__main__':
339 main() 340 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698