OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Tool for automatically creating .nmf files from .nexe/.pexe/.bc executables. | 6 """Tool for automatically creating .nmf files from .nexe/.pexe/.bc executables. |
7 | 7 |
8 As well as creating the nmf file this tool can also find and stage | 8 As well as creating the nmf file this tool can also find and stage |
9 any shared libraries dependencies that the executables might have. | 9 any shared libraries dependencies that the executables might have. |
10 """ | 10 """ |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 | 536 |
537 libpath += [ | 537 libpath += [ |
538 'lib/glibc_x86_32/%s' % config_fallback, | 538 'lib/glibc_x86_32/%s' % config_fallback, |
539 'lib/glibc_x86_64/%s' % config_fallback, | 539 'lib/glibc_x86_64/%s' % config_fallback, |
540 'lib/glibc_arm/%s' % config_fallback, | 540 'lib/glibc_arm/%s' % config_fallback, |
541 'ports/lib/glibc_x86_32/%s' % config_fallback, | 541 'ports/lib/glibc_x86_32/%s' % config_fallback, |
542 'ports/lib/glibc_x86_64/%s' % config_fallback, | 542 'ports/lib/glibc_x86_64/%s' % config_fallback, |
543 'ports/lib/glibc_arm/%s' % config_fallback, | 543 'ports/lib/glibc_arm/%s' % config_fallback, |
544 ] | 544 ] |
545 | 545 |
546 bionic_dir = 'toolchain/%s_arm_bionic' % osname | |
547 if os.path.isdir(os.path.join(sdk_root, bionic_dir)): | |
548 libpath += [ | |
549 '%s/arm-nacl/lib' % bionic_dir, | |
550 '%s/arm-nacl/usr/lib' % bionic_dir, | |
551 'lib/bionic_arm/%s' % config, | |
552 ] | |
553 libpath = [os.path.normpath(p) for p in libpath] | 546 libpath = [os.path.normpath(p) for p in libpath] |
554 libpath = [os.path.join(sdk_root, p) for p in libpath] | 547 libpath = [os.path.join(sdk_root, p) for p in libpath] |
555 return libpath | 548 return libpath |
556 | 549 |
557 | 550 |
558 def main(args): | 551 def main(args): |
559 parser = argparse.ArgumentParser(description=__doc__) | 552 parser = argparse.ArgumentParser(description=__doc__) |
560 parser.add_argument('-o', '--output', dest='output', | 553 parser.add_argument('-o', '--output', dest='output', |
561 help='Write manifest file to FILE (default is stdout)', | 554 help='Write manifest file to FILE (default is stdout)', |
562 metavar='FILE') | 555 metavar='FILE') |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 if __name__ == '__main__': | 697 if __name__ == '__main__': |
705 try: | 698 try: |
706 rtn = main(sys.argv[1:]) | 699 rtn = main(sys.argv[1:]) |
707 except Error, e: | 700 except Error, e: |
708 sys.stderr.write('%s: %s\n' % (os.path.basename(__file__), e)) | 701 sys.stderr.write('%s: %s\n' % (os.path.basename(__file__), e)) |
709 rtn = 1 | 702 rtn = 1 |
710 except KeyboardInterrupt: | 703 except KeyboardInterrupt: |
711 sys.stderr.write('%s: interrupted\n' % os.path.basename(__file__)) | 704 sys.stderr.write('%s: interrupted\n' % os.path.basename(__file__)) |
712 rtn = 1 | 705 rtn = 1 |
713 sys.exit(rtn) | 706 sys.exit(rtn) |
OLD | NEW |