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

Side by Side Diff: native_client_sdk/src/tools/create_nmf.py

Issue 1243823002: [NaCl SDK] Second phase of enable glibc arm toolchain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@reenable_irtext
Patch Set: Created 5 years, 5 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
OLDNEW
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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 as well as the top level SDK lib folder and the naclports lib 503 as well as the top level SDK lib folder and the naclports lib
504 folder. We include both 32-bit and 64-bit library paths. 504 folder. We include both 32-bit and 64-bit library paths.
505 """ 505 """
506 sdk_root = GetSDKRoot() 506 sdk_root = GetSDKRoot()
507 507
508 osname = getos.GetPlatform() 508 osname = getos.GetPlatform()
509 libpath = [ 509 libpath = [
510 # Core toolchain libraries 510 # Core toolchain libraries
511 'toolchain/%s_x86_glibc/x86_64-nacl/lib' % osname, 511 'toolchain/%s_x86_glibc/x86_64-nacl/lib' % osname,
512 'toolchain/%s_x86_glibc/x86_64-nacl/lib32' % osname, 512 'toolchain/%s_x86_glibc/x86_64-nacl/lib32' % osname,
513 'toolchain/%s_arm_glibc/arm-nacl/lib' % osname,
513 # naclports installed libraries 514 # naclports installed libraries
514 'toolchain/%s_x86_glibc/x86_64-nacl/usr/lib' % osname, 515 'toolchain/%s_x86_glibc/x86_64-nacl/usr/lib' % osname,
515 'toolchain/%s_x86_glibc/i686-nacl/usr/lib' % osname, 516 'toolchain/%s_x86_glibc/i686-nacl/usr/lib' % osname,
517 'toolchain/%s_arm_glibc/arm-nacl/usr/lib' % osname,
516 # SDK bundle libraries 518 # SDK bundle libraries
517 'lib/glibc_x86_32/%s' % config, 519 'lib/glibc_x86_32/%s' % config,
518 'lib/glibc_x86_64/%s' % config, 520 'lib/glibc_x86_64/%s' % config,
521 'lib/glibc_arm/%s' % config,
519 # naclports bundle libraries 522 # naclports bundle libraries
520 'ports/lib/glibc_x86_32/%s' % config, 523 'ports/lib/glibc_x86_32/%s' % config,
521 'ports/lib/glibc_x86_64/%s' % config, 524 'ports/lib/glibc_x86_64/%s' % config,
525 'ports/lib/glibc_arm/%s' % config,
522 ] 526 ]
523 527
524 # In some cases (e.g. ASAN, TSAN, STANDALONE) the name of the configuration 528 # In some cases (e.g. ASAN, TSAN, STANDALONE) the name of the configuration
525 # can be different to simply Debug or Release. For example 'msan_Release'. 529 # can be different to simply Debug or Release. For example 'msan_Release'.
526 # In this case we search for libraries first in this directory and then 530 # In this case we search for libraries first in this directory and then
527 # fall back to 'Release'. 531 # fall back to 'Release'.
528 if config not in ['Debug', 'Release']: 532 if config not in ['Debug', 'Release']:
529 config_fallback = 'Release' 533 config_fallback = 'Release'
530 if 'Debug' in config: 534 if 'Debug' in config:
531 config_fallback = 'Debug' 535 config_fallback = 'Debug'
532 536
533 libpath += [ 537 libpath += [
534 'lib/glibc_x86_32/%s' % config_fallback, 538 'lib/glibc_x86_32/%s' % config_fallback,
535 'lib/glibc_x86_64/%s' % config_fallback, 539 'lib/glibc_x86_64/%s' % config_fallback,
540 'lib/glibc_arm/%s' % config_fallback,
536 'ports/lib/glibc_x86_32/%s' % config_fallback, 541 'ports/lib/glibc_x86_32/%s' % config_fallback,
537 '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,
538 ] 544 ]
539 545
540 bionic_dir = 'toolchain/%s_arm_bionic' % osname 546 bionic_dir = 'toolchain/%s_arm_bionic' % osname
541 if os.path.isdir(os.path.join(sdk_root, bionic_dir)): 547 if os.path.isdir(os.path.join(sdk_root, bionic_dir)):
542 libpath += [ 548 libpath += [
543 '%s/arm-nacl/lib' % bionic_dir, 549 '%s/arm-nacl/lib' % bionic_dir,
544 '%s/arm-nacl/usr/lib' % bionic_dir, 550 '%s/arm-nacl/usr/lib' % bionic_dir,
545 'lib/bionic_arm/%s' % config, 551 'lib/bionic_arm/%s' % config,
546 ] 552 ]
547 libpath = [os.path.normpath(p) for p in libpath] 553 libpath = [os.path.normpath(p) for p in libpath]
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 if __name__ == '__main__': 705 if __name__ == '__main__':
700 try: 706 try:
701 rtn = main(sys.argv[1:]) 707 rtn = main(sys.argv[1:])
702 except Error, e: 708 except Error, e:
703 sys.stderr.write('%s: %s\n' % (os.path.basename(__file__), e)) 709 sys.stderr.write('%s: %s\n' % (os.path.basename(__file__), e))
704 rtn = 1 710 rtn = 1
705 except KeyboardInterrupt: 711 except KeyboardInterrupt:
706 sys.stderr.write('%s: interrupted\n' % os.path.basename(__file__)) 712 sys.stderr.write('%s: interrupted\n' % os.path.basename(__file__))
707 rtn = 1 713 rtn = 1
708 sys.exit(rtn) 714 sys.exit(rtn)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698