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

Side by Side Diff: native_client_sdk/src/build_tools/build_sdk.py

Issue 1388503003: [NaCl SDK] Remove newlib toolchain from the SDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 """Entry point for both build and try bots. 6 """Entry point for both build and try bots.
7 7
8 This script is invoked from XXX, usually without arguments 8 This script is invoked from XXX, usually without arguments
9 to package an SDK. It automatically determines whether 9 to package an SDK. It automatically determines whether
10 this SDK is for mac, win, linux. 10 this SDK is for mac, win, linux.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 NACLPORTS_URL = 'https://chromium.googlesource.com/external/naclports.git' 59 NACLPORTS_URL = 'https://chromium.googlesource.com/external/naclports.git'
60 NACLPORTS_REV = '65c71c1524a74ff8415573e5e5ef7c59ce4ac437' 60 NACLPORTS_REV = '65c71c1524a74ff8415573e5e5ef7c59ce4ac437'
61 61
62 GYPBUILD_DIR = 'gypbuild' 62 GYPBUILD_DIR = 'gypbuild'
63 63
64 options = None 64 options = None
65 65
66 # Map of: ToolchainName: (PackageName, SDKDir, arch). 66 # Map of: ToolchainName: (PackageName, SDKDir, arch).
67 TOOLCHAIN_PACKAGE_MAP = { 67 TOOLCHAIN_PACKAGE_MAP = {
68 'arm_newlib': ('nacl_arm_newlib', '%(platform)s_arm_newlib', 'arm'),
69 'arm_glibc': ('nacl_arm_glibc', '%(platform)s_arm_glibc', 'arm'), 68 'arm_glibc': ('nacl_arm_glibc', '%(platform)s_arm_glibc', 'arm'),
70 'x86_newlib': ('nacl_x86_newlib', '%(platform)s_x86_newlib', 'x86'),
71 'x86_glibc': ('nacl_x86_glibc', '%(platform)s_x86_glibc', 'x86'), 69 'x86_glibc': ('nacl_x86_glibc', '%(platform)s_x86_glibc', 'x86'),
72 'arm_bionic': ('nacl_arm_bionic', '%(platform)s_arm_bionic', 'arm'), 70 'arm_bionic': ('nacl_arm_bionic', '%(platform)s_arm_bionic', 'arm'),
73 'pnacl': ('pnacl_newlib', '%(platform)s_pnacl', 'pnacl') 71 'pnacl': ('pnacl_newlib', '%(platform)s_pnacl', 'pnacl')
74 } 72 }
75 73
76 74
77 def GetToolchainDirName(tcname): 75 def GetToolchainDirName(tcname):
78 """Return the directory name for a given toolchain""" 76 """Return the directory name for a given toolchain"""
79 return TOOLCHAIN_PACKAGE_MAP[tcname][1] % {'platform': getos.GetPlatform()} 77 return TOOLCHAIN_PACKAGE_MAP[tcname][1] % {'platform': getos.GetPlatform()}
80 78
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 ] 443 ]
446 InstallFiles(GetNinjaOutDir('arm'), tools_dir, arm_files) 444 InstallFiles(GetNinjaOutDir('arm'), tools_dir, arm_files)
447 445
448 for tc in toolchains: 446 for tc in toolchains:
449 if tc in ('host', 'clang-newlib'): 447 if tc in ('host', 'clang-newlib'):
450 continue 448 continue
451 elif tc == 'pnacl': 449 elif tc == 'pnacl':
452 xarches = (None, 'ia32', 'x64', 'arm') 450 xarches = (None, 'ia32', 'x64', 'arm')
453 elif tc in ('x86_glibc', 'x86_newlib'): 451 elif tc in ('x86_glibc', 'x86_newlib'):
454 xarches = ('ia32', 'x64') 452 xarches = ('ia32', 'x64')
455 elif tc in ('arm_glibc', 'arm_newlib', 'arm_bionic'): 453 elif tc in ('arm_glibc', 'arm_bionic'):
456 xarches = ('arm',) 454 xarches = ('arm',)
457 else: 455 else:
458 raise AssertionError('unexpected toolchain value: %s' % tc) 456 raise AssertionError('unexpected toolchain value: %s' % tc)
459 457
460 for xarch in xarches: 458 for xarch in xarches:
461 src_dir = GetGypBuiltLib(tc, xarch) 459 src_dir = GetGypBuiltLib(tc, xarch)
462 dst_dir = GetOutputToolchainLib(pepperdir, tc, xarch) 460 dst_dir = GetOutputToolchainLib(pepperdir, tc, xarch)
463 libc = GetToolchainLibc(tc) 461 libc = GetToolchainLibc(tc)
464 InstallFiles(src_dir, dst_dir, TOOLCHAIN_LIBS[libc]) 462 InstallFiles(src_dir, dst_dir, TOOLCHAIN_LIBS[libc])
465 463
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 if build: 588 if build:
591 GypNinjaBuild_NaCl(GYPBUILD_DIR) 589 GypNinjaBuild_NaCl(GYPBUILD_DIR)
592 GypNinjaBuild_Breakpad(GYPBUILD_DIR + '-x64') 590 GypNinjaBuild_Breakpad(GYPBUILD_DIR + '-x64')
593 591
594 if set(toolchains) & set(['x86_glibc', 'x86_newlib']): 592 if set(toolchains) & set(['x86_glibc', 'x86_newlib']):
595 GypNinjaBuild_PPAPI('ia32', GYPBUILD_DIR + '-ia32', 593 GypNinjaBuild_PPAPI('ia32', GYPBUILD_DIR + '-ia32',
596 ['use_nacl_clang=0']) 594 ['use_nacl_clang=0'])
597 GypNinjaBuild_PPAPI('x64', GYPBUILD_DIR + '-x64', 595 GypNinjaBuild_PPAPI('x64', GYPBUILD_DIR + '-x64',
598 ['use_nacl_clang=0']) 596 ['use_nacl_clang=0'])
599 597
600 if set(toolchains) & set(['arm_glibc', 'arm_newlib']): 598 if 'arm_glibc' in toolchains:
601 GypNinjaBuild_PPAPI('arm', GYPBUILD_DIR + '-arm', 599 GypNinjaBuild_PPAPI('arm', GYPBUILD_DIR + '-arm',
602 ['use_nacl_clang=0'] ) 600 ['use_nacl_clang=0'] )
603 601
604 if 'pnacl' in toolchains: 602 if 'pnacl' in toolchains:
605 GypNinjaBuild_PPAPI('ia32', GYPBUILD_DIR + '-clang-ia32', 603 GypNinjaBuild_PPAPI('ia32', GYPBUILD_DIR + '-clang-ia32',
606 ['use_nacl_clang=1']) 604 ['use_nacl_clang=1'])
607 GypNinjaBuild_PPAPI('x64', GYPBUILD_DIR + '-clang-x64', 605 GypNinjaBuild_PPAPI('x64', GYPBUILD_DIR + '-clang-x64',
608 ['use_nacl_clang=1']) 606 ['use_nacl_clang=1'])
609 GypNinjaBuild_PPAPI('arm', GYPBUILD_DIR + '-clang-arm', 607 GypNinjaBuild_PPAPI('arm', GYPBUILD_DIR + '-clang-arm',
610 ['use_nacl_clang=1']) 608 ['use_nacl_clang=1'])
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 if buildbot_common.IsSDKBuilder(): 944 if buildbot_common.IsSDKBuilder():
947 options.archive = True 945 options.archive = True
948 # TODO(binji): re-enable app_engine build when the linux builder stops 946 # TODO(binji): re-enable app_engine build when the linux builder stops
949 # breaking when trying to git clone from github. 947 # breaking when trying to git clone from github.
950 # See http://crbug.com/412969. 948 # See http://crbug.com/412969.
951 options.build_app_engine = False 949 options.build_app_engine = False
952 options.tar = True 950 options.tar = True
953 951
954 # NOTE: order matters here. This will be the order that is specified in the 952 # NOTE: order matters here. This will be the order that is specified in the
955 # Makefiles; the first toolchain will be the default. 953 # Makefiles; the first toolchain will be the default.
956 toolchains = ['pnacl', 'x86_newlib', 'x86_glibc', 'arm_newlib', 'arm_glibc', 954 toolchains = ['pnacl', 'x86_glibc', 'arm_glibc', 'clang-newlib', 'host']
957 'clang-newlib', 'host']
958 955
959 # Changes for experimental bionic builder 956 # Changes for experimental bionic builder
960 if options.bionic: 957 if options.bionic:
961 toolchains.append('arm_bionic') 958 toolchains.append('arm_bionic')
962 options.build_app_engine = False 959 options.build_app_engine = False
963 960
964 print 'Building: ' + ' '.join(toolchains) 961 print 'Building: ' + ' '.join(toolchains)
965 platform = getos.GetPlatform() 962 platform = getos.GetPlatform()
966 963
967 if options.archive and not options.tar: 964 if options.archive and not options.tar:
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 BuildStepArchivePNaClComponent(chrome_revision) 1076 BuildStepArchivePNaClComponent(chrome_revision)
1080 1077
1081 return 0 1078 return 0
1082 1079
1083 1080
1084 if __name__ == '__main__': 1081 if __name__ == '__main__':
1085 try: 1082 try:
1086 sys.exit(main(sys.argv[1:])) 1083 sys.exit(main(sys.argv[1:]))
1087 except KeyboardInterrupt: 1084 except KeyboardInterrupt:
1088 buildbot_common.ErrorExit('build_sdk: interrupted') 1085 buildbot_common.ErrorExit('build_sdk: interrupted')
OLDNEW
« no previous file with comments | « native_client_sdk/src/build_tools/build_artifacts.py ('k') | native_client_sdk/src/build_tools/extract_artifacts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698