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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 | 545 |
546 libpath += [ | 546 libpath += [ |
547 'lib/glibc_x86_32/%s' % config_fallback, | 547 'lib/glibc_x86_32/%s' % config_fallback, |
548 'lib/glibc_x86_64/%s' % config_fallback, | 548 'lib/glibc_x86_64/%s' % config_fallback, |
549 'lib/glibc_arm/%s' % config_fallback, | 549 'lib/glibc_arm/%s' % config_fallback, |
550 'ports/lib/glibc_x86_32/%s' % config_fallback, | 550 'ports/lib/glibc_x86_32/%s' % config_fallback, |
551 'ports/lib/glibc_x86_64/%s' % config_fallback, | 551 'ports/lib/glibc_x86_64/%s' % config_fallback, |
552 'ports/lib/glibc_arm/%s' % config_fallback, | 552 'ports/lib/glibc_arm/%s' % config_fallback, |
553 ] | 553 ] |
554 | 554 |
555 bionic_dir = 'toolchain/%s_arm_bionic' % osname | |
556 if os.path.isdir(os.path.join(sdk_root, bionic_dir)): | |
557 libpath += [ | |
558 '%s/arm-nacl/lib' % bionic_dir, | |
559 '%s/arm-nacl/usr/lib' % bionic_dir, | |
560 'lib/bionic_arm/%s' % config, | |
561 ] | |
562 libpath = [os.path.normpath(p) for p in libpath] | 555 libpath = [os.path.normpath(p) for p in libpath] |
563 libpath = [os.path.join(sdk_root, p) for p in libpath] | 556 libpath = [os.path.join(sdk_root, p) for p in libpath] |
564 libpath.append(os.path.join(sdk_root, 'tools')) | 557 libpath.append(os.path.join(sdk_root, 'tools')) |
565 return libpath | 558 return libpath |
566 | 559 |
567 | 560 |
568 def main(args): | 561 def main(args): |
569 parser = argparse.ArgumentParser(description=__doc__) | 562 parser = argparse.ArgumentParser(description=__doc__) |
570 parser.add_argument('-o', '--output', dest='output', | 563 parser.add_argument('-o', '--output', dest='output', |
571 help='Write manifest file to FILE (default is stdout)', | 564 help='Write manifest file to FILE (default is stdout)', |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 if __name__ == '__main__': | 707 if __name__ == '__main__': |
715 try: | 708 try: |
716 rtn = main(sys.argv[1:]) | 709 rtn = main(sys.argv[1:]) |
717 except Error, e: | 710 except Error, e: |
718 sys.stderr.write('%s: %s\n' % (os.path.basename(__file__), e)) | 711 sys.stderr.write('%s: %s\n' % (os.path.basename(__file__), e)) |
719 rtn = 1 | 712 rtn = 1 |
720 except KeyboardInterrupt: | 713 except KeyboardInterrupt: |
721 sys.stderr.write('%s: interrupted\n' % os.path.basename(__file__)) | 714 sys.stderr.write('%s: interrupted\n' % os.path.basename(__file__)) |
722 rtn = 1 | 715 rtn = 1 |
723 sys.exit(rtn) | 716 sys.exit(rtn) |
OLD | NEW |