| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 # Run the linker regardless of hybrid mode. | 267 # Run the linker regardless of hybrid mode. |
| 268 linker = ( | 268 linker = ( |
| 269 '{root}/../third_party/llvm-build/Release+Asserts/bin/clang' | 269 '{root}/../third_party/llvm-build/Release+Asserts/bin/clang' |
| 270 ).format(root=nacl_root) | 270 ).format(root=nacl_root) |
| 271 shellcmd(( | 271 shellcmd(( |
| 272 '{ld} -m32 {partial} -o {exe} -O{opt_level} ' + | 272 '{ld} -m32 {partial} -o {exe} -O{opt_level} ' + |
| 273 # Keep the rest of this command line (except szrt.c) in sync | 273 # Keep the rest of this command line (except szrt.c) in sync |
| 274 # with RunHostLD() in pnacl-translate.py. | 274 # with RunHostLD() in pnacl-translate.py. |
| 275 '{root}/toolchain/linux_x86/pnacl_newlib/translator/x86-32-linux/lib/' + | 275 '{root}/toolchain/linux_x86/pnacl_newlib/translator/x86-32-linux/lib/' + |
| 276 '{{unsandboxed_irt,irt_query_list}}.o ' + | 276 '{{unsandboxed_irt,irt_random,irt_query_list}}.o ' + |
| 277 '{root}/toolchain_build/src/subzero/runtime/szrt.c ' + | 277 '{root}/toolchain_build/src/subzero/runtime/szrt.c ' + |
| 278 '{root}/toolchain_build/src/subzero/runtime/szrt_i686.ll ' + | 278 '{root}/toolchain_build/src/subzero/runtime/szrt_i686.ll ' + |
| 279 '-lpthread -lrt' | 279 '-lpthread -lrt' |
| 280 ).format(ld=linker, partial=obj_partial, exe=exe, | 280 ).format(ld=linker, partial=obj_partial, exe=exe, |
| 281 opt_level=opt_level_map[opt_level], root=nacl_root), | 281 opt_level=opt_level_map[opt_level], root=nacl_root), |
| 282 echo=args.verbose) | 282 echo=args.verbose) |
| 283 | 283 |
| 284 # Put the extra verbose printing at the end. | 284 # Put the extra verbose printing at the end. |
| 285 if args.verbose: | 285 if args.verbose: |
| 286 print 'PATH={path}'.format(path=os.environ['PATH']) | 286 print 'PATH={path}'.format(path=os.environ['PATH']) |
| 287 if hybrid: | 287 if hybrid: |
| 288 print 'include={regex}'.format(regex=re_include_str) | 288 print 'include={regex}'.format(regex=re_include_str) |
| 289 print 'exclude={regex}'.format(regex=re_exclude_str) | 289 print 'exclude={regex}'.format(regex=re_exclude_str) |
| 290 print 'default_match={dm}'.format(dm=default_match) | 290 print 'default_match={dm}'.format(dm=default_match) |
| 291 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms)) | 291 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms)) |
| 292 | 292 |
| 293 if __name__ == '__main__': | 293 if __name__ == '__main__': |
| 294 main() | 294 main() |
| OLD | NEW |