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 """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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 'newlib': ('nacl_x86_newlib', '%(platform)s_x86_newlib'), | 68 'newlib': ('nacl_x86_newlib', '%(platform)s_x86_newlib'), |
69 'bionic': ('nacl_arm_bionic', '%(platform)s_arm_bionic'), | 69 'bionic': ('nacl_arm_bionic', '%(platform)s_arm_bionic'), |
70 'arm': ('nacl_arm_newlib', '%(platform)s_arm_newlib'), | 70 'arm': ('nacl_arm_newlib', '%(platform)s_arm_newlib'), |
71 'glibc': ('nacl_x86_glibc', '%(platform)s_x86_glibc'), | 71 'glibc': ('nacl_x86_glibc', '%(platform)s_x86_glibc'), |
72 'pnacl': ('pnacl_newlib', '%(platform)s_pnacl') | 72 'pnacl': ('pnacl_newlib', '%(platform)s_pnacl') |
73 } | 73 } |
74 | 74 |
75 | 75 |
76 def GetToolchainNaClInclude(tcname, tcpath, arch): | 76 def GetToolchainNaClInclude(tcname, tcpath, arch): |
77 if arch == 'x86': | 77 if arch == 'x86': |
78 if tcname == 'pnacl': | |
79 return os.path.join(tcpath, 'le32-nacl', 'include') | |
80 return os.path.join(tcpath, 'x86_64-nacl', 'include') | 78 return os.path.join(tcpath, 'x86_64-nacl', 'include') |
79 elif arch == 'pnacl': | |
80 return os.path.join(tcpath, 'le32-nacl', 'include') | |
81 elif arch == 'arm': | 81 elif arch == 'arm': |
82 return os.path.join(tcpath, 'arm-nacl', 'include') | 82 return os.path.join(tcpath, 'arm-nacl', 'include') |
83 else: | 83 else: |
84 buildbot_common.ErrorExit('Unknown architecture: %s' % arch) | 84 buildbot_common.ErrorExit('Unknown architecture: %s' % arch) |
85 | 85 |
86 | 86 |
87 def GetConfigDir(arch): | 87 def GetConfigDir(arch): |
88 if arch == 'x64' and getos.GetPlatform() == 'win': | 88 if arch.endswith('x64') and getos.GetPlatform() == 'win': |
89 return 'Release_x64' | 89 return 'Release_x64' |
90 else: | 90 else: |
91 return 'Release' | 91 return 'Release' |
92 | 92 |
93 | 93 |
94 def GetNinjaOutDir(arch): | 94 def GetNinjaOutDir(arch): |
95 return os.path.join(OUT_DIR, GYPBUILD_DIR + '-' + arch, GetConfigDir(arch)) | 95 return os.path.join(OUT_DIR, GYPBUILD_DIR + '-' + arch, GetConfigDir(arch)) |
96 | 96 |
97 | 97 |
98 def GetGypBuiltLib(tcname, arch): | 98 def GetGypBuiltLib(tcname, arch): |
99 if arch == 'ia32': | 99 if arch == 'ia32': |
100 lib_suffix = '32' | 100 lib_suffix = '32' |
101 elif arch == 'x64': | 101 elif arch == 'x64': |
102 lib_suffix = '64' | 102 lib_suffix = '64' |
103 elif arch == 'arm': | 103 elif arch == 'arm': |
104 lib_suffix = 'arm' | 104 lib_suffix = 'arm' |
105 else: | 105 else: |
106 lib_suffix = '' | 106 lib_suffix = '' |
107 | 107 |
108 if tcname == 'pnacl': | 108 if tcname == 'pnacl': |
109 tcname = 'pnacl_newlib' | 109 print arch |
binji
2015/02/20 18:34:23
remove?
| |
110 arch = 'x64' | 110 if arch is None: |
111 arch = 'x64' | |
112 tcname = 'pnacl_newlib' | |
113 else: | |
114 arch = 'clang-' + arch | |
115 tcname = 'newlib' | |
111 | 116 |
112 return os.path.join(GetNinjaOutDir(arch), | 117 return os.path.join(GetNinjaOutDir(arch), |
113 'gen', | 118 'gen', |
114 'tc_' + tcname, | 119 'tc_' + tcname, |
115 'lib' + lib_suffix) | 120 'lib' + lib_suffix) |
116 | 121 |
117 | 122 |
118 def GetToolchainNaClLib(tcname, tcpath, arch): | 123 def GetToolchainNaClLib(tcname, tcpath, arch): |
119 if tcname == 'pnacl': | 124 if arch == 'ia32': |
120 return os.path.join(tcpath, 'le32-nacl', 'lib') | |
121 elif arch == 'ia32': | |
122 return os.path.join(tcpath, 'x86_64-nacl', 'lib32') | 125 return os.path.join(tcpath, 'x86_64-nacl', 'lib32') |
123 elif arch == 'x64': | 126 elif arch == 'x64': |
124 return os.path.join(tcpath, 'x86_64-nacl', 'lib') | 127 return os.path.join(tcpath, 'x86_64-nacl', 'lib') |
125 elif arch == 'arm': | 128 elif arch == 'arm': |
126 return os.path.join(tcpath, 'arm-nacl', 'lib') | 129 return os.path.join(tcpath, 'arm-nacl', 'lib') |
130 elif tcname == 'pnacl': | |
131 return os.path.join(tcpath, 'le32-nacl', 'lib') | |
127 | 132 |
128 | 133 |
129 def GetToolchainDirName(tcname, arch): | 134 def GetToolchainDirName(tcname, arch): |
130 if tcname == 'pnacl': | 135 if tcname == 'pnacl': |
131 return '%s_%s' % (getos.GetPlatform(), tcname) | 136 return '%s_%s' % (getos.GetPlatform(), tcname) |
132 elif arch == 'arm': | 137 elif arch == 'arm': |
133 return '%s_arm_%s' % (getos.GetPlatform(), tcname) | 138 return '%s_arm_%s' % (getos.GetPlatform(), tcname) |
134 else: | 139 else: |
135 return '%s_x86_%s' % (getos.GetPlatform(), tcname) | 140 return '%s_x86_%s' % (getos.GetPlatform(), tcname) |
136 | 141 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
319 else: | 324 else: |
320 dest = dest_file | 325 dest = dest_file |
321 dest = os.path.join(dest_root, dest) | 326 dest = os.path.join(dest_root, dest) |
322 if not os.path.isdir(os.path.dirname(dest)): | 327 if not os.path.isdir(os.path.dirname(dest)): |
323 buildbot_common.MakeDir(os.path.dirname(dest)) | 328 buildbot_common.MakeDir(os.path.dirname(dest)) |
324 buildbot_common.CopyFile(source, dest) | 329 buildbot_common.CopyFile(source, dest) |
325 | 330 |
326 | 331 |
327 def InstallNaClHeaders(tc_dst_inc, tc_name): | 332 def InstallNaClHeaders(tc_dst_inc, tc_name): |
328 """Copies NaCl headers to expected locations in the toolchain.""" | 333 """Copies NaCl headers to expected locations in the toolchain.""" |
329 if tc_name == 'arm': | 334 if tc_name in ('arm', 'pnacl'): |
330 # arm toolchain header should be the same as the x86 newlib | 335 # arm and pnacl toolchain headers should be the same as the newlib |
331 # ones | 336 # ones |
332 tc_name = 'newlib' | 337 tc_name = 'newlib' |
333 | 338 |
334 InstallFiles(SRC_DIR, tc_dst_inc, NACL_HEADER_MAP[tc_name]) | 339 InstallFiles(SRC_DIR, tc_dst_inc, NACL_HEADER_MAP[tc_name]) |
335 | 340 |
336 | 341 |
337 def MakeNinjaRelPath(path): | 342 def MakeNinjaRelPath(path): |
338 return os.path.join(os.path.relpath(OUT_DIR, SRC_DIR), path) | 343 return os.path.join(os.path.relpath(OUT_DIR, SRC_DIR), path) |
339 | 344 |
340 | 345 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
436 ['irt_core_newlib_arm.nexe', 'irt_core_arm.nexe'], | 441 ['irt_core_newlib_arm.nexe', 'irt_core_arm.nexe'], |
437 ['irt_core_newlib_arm.nexe', 'irt_core_arm.nexe'], | 442 ['irt_core_newlib_arm.nexe', 'irt_core_arm.nexe'], |
438 ['nacl_helper_bootstrap', 'nacl_helper_bootstrap_arm'], | 443 ['nacl_helper_bootstrap', 'nacl_helper_bootstrap_arm'], |
439 ['nonsfi_loader_newlib_arm_nonsfi.nexe', 'nonsfi_loader_arm'], | 444 ['nonsfi_loader_newlib_arm_nonsfi.nexe', 'nonsfi_loader_arm'], |
440 ['sel_ldr', 'sel_ldr_arm'] | 445 ['sel_ldr', 'sel_ldr_arm'] |
441 ] | 446 ] |
442 InstallFiles(GetNinjaOutDir('arm'), tools_dir, arm_files) | 447 InstallFiles(GetNinjaOutDir('arm'), tools_dir, arm_files) |
443 | 448 |
444 for tc in set(toolchains) & set(['newlib', 'glibc', 'pnacl']): | 449 for tc in set(toolchains) & set(['newlib', 'glibc', 'pnacl']): |
445 if tc == 'pnacl': | 450 if tc == 'pnacl': |
446 xarches = (None,) | 451 xarches = (None, 'ia32', 'x64') |
bradn
2015/02/17 20:21:48
why isn't arm in here?
I thought it now works for
Sam Clegg
2015/02/17 20:31:12
See my other comment.
| |
452 elif tc == 'glibc': | |
453 xarches = ('ia32', 'x64') | |
447 else: | 454 else: |
448 xarches = ('arm', 'ia32', 'x64') | 455 xarches = ('arm', 'ia32', 'x64') |
449 | 456 |
450 for xarch in xarches: | 457 for xarch in xarches: |
451 if tc == 'glibc' and xarch == 'arm': | |
452 continue | |
453 | |
454 src_dir = GetGypBuiltLib(tc, xarch) | 458 src_dir = GetGypBuiltLib(tc, xarch) |
455 dst_dir = GetOutputToolchainLib(pepperdir, tc, xarch) | 459 dst_dir = GetOutputToolchainLib(pepperdir, tc, xarch) |
456 InstallFiles(src_dir, dst_dir, TOOLCHAIN_LIBS[tc]) | 460 InstallFiles(src_dir, dst_dir, TOOLCHAIN_LIBS[tc]) |
457 | 461 |
458 # Copy ARM newlib components to bionic | 462 # Copy ARM newlib components to bionic |
459 if tc == 'newlib' and xarch == 'arm' and 'bionic' in toolchains: | 463 if tc == 'newlib' and xarch == 'arm' and 'bionic' in toolchains: |
460 bionic_dir = GetOutputToolchainLib(pepperdir, 'bionic', xarch) | 464 bionic_dir = GetOutputToolchainLib(pepperdir, 'bionic', xarch) |
461 InstallFiles(src_dir, bionic_dir, TOOLCHAIN_LIBS['bionic']) | 465 InstallFiles(src_dir, bionic_dir, TOOLCHAIN_LIBS['bionic']) |
462 | 466 |
463 if tc != 'pnacl': | 467 if tc != 'pnacl': |
(...skipping 10 matching lines...) Expand all Loading... | |
474 # | 478 # |
475 # For now, let's use gyp_chromium to build these components. | 479 # For now, let's use gyp_chromium to build these components. |
476 # gyp_py = os.path.join(NACL_DIR, 'build', 'gyp_nacl') | 480 # gyp_py = os.path.join(NACL_DIR, 'build', 'gyp_nacl') |
477 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') | 481 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') |
478 nacl_core_sdk_gyp = os.path.join(NACL_DIR, 'build', 'nacl_core_sdk.gyp') | 482 nacl_core_sdk_gyp = os.path.join(NACL_DIR, 'build', 'nacl_core_sdk.gyp') |
479 all_gyp = os.path.join(NACL_DIR, 'build', 'all.gyp') | 483 all_gyp = os.path.join(NACL_DIR, 'build', 'all.gyp') |
480 | 484 |
481 out_dir_32 = MakeNinjaRelPath(rel_out_dir + '-ia32') | 485 out_dir_32 = MakeNinjaRelPath(rel_out_dir + '-ia32') |
482 out_dir_64 = MakeNinjaRelPath(rel_out_dir + '-x64') | 486 out_dir_64 = MakeNinjaRelPath(rel_out_dir + '-x64') |
483 out_dir_arm = MakeNinjaRelPath(rel_out_dir + '-arm') | 487 out_dir_arm = MakeNinjaRelPath(rel_out_dir + '-arm') |
488 out_dir_clang_32 = MakeNinjaRelPath(rel_out_dir + '-clang-ia32') | |
489 out_dir_clang_64 = MakeNinjaRelPath(rel_out_dir + '-clang-x64') | |
490 | |
484 GypNinjaBuild('ia32', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_32) | 491 GypNinjaBuild('ia32', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_32) |
492 GypNinjaBuild('x64', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_64) | |
493 GypNinjaBuild('ia32', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', | |
494 out_dir_clang_32, gyp_defines=['use_nacl_clang=1']) | |
495 GypNinjaBuild('x64', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', | |
496 out_dir_clang_64, gyp_defines=['use_nacl_clang=1']) | |
485 GypNinjaBuild('arm', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_arm) | 497 GypNinjaBuild('arm', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_arm) |
486 GypNinjaBuild('x64', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_64) | |
487 GypNinjaBuild('x64', gyp_py, all_gyp, 'ncval_new', out_dir_64) | 498 GypNinjaBuild('x64', gyp_py, all_gyp, 'ncval_new', out_dir_64) |
488 | 499 |
489 | 500 |
490 def GypNinjaBuild_Breakpad(rel_out_dir): | 501 def GypNinjaBuild_Breakpad(rel_out_dir): |
491 # TODO(binji): dump_syms doesn't currently build on Windows. See | 502 # TODO(binji): dump_syms doesn't currently build on Windows. See |
492 # http://crbug.com/245456 | 503 # http://crbug.com/245456 |
493 if getos.GetPlatform() == 'win': | 504 if getos.GetPlatform() == 'win': |
494 return | 505 return |
495 | 506 |
496 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') | 507 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') |
497 out_dir = MakeNinjaRelPath(rel_out_dir) | 508 out_dir = MakeNinjaRelPath(rel_out_dir) |
498 gyp_file = os.path.join(SRC_DIR, 'breakpad', 'breakpad.gyp') | 509 gyp_file = os.path.join(SRC_DIR, 'breakpad', 'breakpad.gyp') |
499 build_list = ['dump_syms', 'minidump_dump', 'minidump_stackwalk'] | 510 build_list = ['dump_syms', 'minidump_dump', 'minidump_stackwalk'] |
500 GypNinjaBuild('x64', gyp_py, gyp_file, build_list, out_dir) | 511 GypNinjaBuild('x64', gyp_py, gyp_file, build_list, out_dir) |
501 | 512 |
502 | 513 |
503 def GypNinjaBuild_PPAPI(arch, rel_out_dir): | 514 def GypNinjaBuild_PPAPI(arch, rel_out_dir, gyp_defines=None): |
504 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') | 515 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') |
505 out_dir = MakeNinjaRelPath(rel_out_dir) | 516 out_dir = MakeNinjaRelPath(rel_out_dir) |
506 gyp_file = os.path.join(SRC_DIR, 'ppapi', 'native_client', | 517 gyp_file = os.path.join(SRC_DIR, 'ppapi', 'native_client', |
507 'native_client.gyp') | 518 'native_client.gyp') |
508 GypNinjaBuild(arch, gyp_py, gyp_file, 'ppapi_lib', out_dir) | 519 GypNinjaBuild(arch, gyp_py, gyp_file, 'ppapi_lib', out_dir, |
520 gyp_defines=gyp_defines) | |
509 | 521 |
510 | 522 |
511 def GypNinjaBuild_Pnacl(rel_out_dir, target_arch): | 523 def GypNinjaBuild_Pnacl(rel_out_dir, target_arch): |
512 # TODO(binji): This will build the pnacl_irt_shim twice; once as part of the | 524 # TODO(binji): This will build the pnacl_irt_shim twice; once as part of the |
513 # Chromium build, and once here. When we move more of the SDK build process | 525 # Chromium build, and once here. When we move more of the SDK build process |
514 # to gyp, we can remove this. | 526 # to gyp, we can remove this. |
515 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') | 527 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') |
516 | 528 |
517 out_dir = MakeNinjaRelPath(rel_out_dir) | 529 out_dir = MakeNinjaRelPath(rel_out_dir) |
518 gyp_file = os.path.join(SRC_DIR, 'ppapi', 'native_client', 'src', | 530 gyp_file = os.path.join(SRC_DIR, 'ppapi', 'native_client', 'src', |
519 'untrusted', 'pnacl_irt_shim', 'pnacl_irt_shim.gyp') | 531 'untrusted', 'pnacl_irt_shim', 'pnacl_irt_shim.gyp') |
520 targets = ['aot'] | 532 targets = ['aot'] |
521 GypNinjaBuild(target_arch, gyp_py, gyp_file, targets, out_dir) | 533 GypNinjaBuild(target_arch, gyp_py, gyp_file, targets, out_dir) |
522 | 534 |
523 | 535 |
524 def GypNinjaBuild(arch, gyp_py_script, gyp_file, targets, out_dir): | 536 def GypNinjaBuild(arch, gyp_py_script, gyp_file, targets, |
537 out_dir, force_arm_gcc=True, gyp_defines=None): | |
binji
2015/02/20 18:34:23
force_arm_gcc is never used...?
| |
525 gyp_env = dict(os.environ) | 538 gyp_env = dict(os.environ) |
526 gyp_env['GYP_GENERATORS'] = 'ninja' | 539 gyp_env['GYP_GENERATORS'] = 'ninja' |
527 gyp_defines = ['nacl_allow_thin_archives=0'] | 540 gyp_defines = gyp_defines or [] |
541 gyp_defines.append('nacl_allow_thin_archives=0') | |
528 if options.mac_sdk: | 542 if options.mac_sdk: |
529 gyp_defines.append('mac_sdk=%s' % options.mac_sdk) | 543 gyp_defines.append('mac_sdk=%s' % options.mac_sdk) |
544 | |
530 if arch is not None: | 545 if arch is not None: |
531 gyp_defines.append('target_arch=%s' % arch) | 546 gyp_defines.append('target_arch=%s' % arch) |
532 if arch == 'arm': | 547 if arch == 'arm': |
533 gyp_env['GYP_CROSSCOMPILE'] = '1' | 548 gyp_env['GYP_CROSSCOMPILE'] = '1' |
534 gyp_defines += ['arm_float_abi=hard'] | 549 gyp_defines.append('arm_float_abi=hard') |
535 if options.no_arm_trusted: | 550 if options.no_arm_trusted: |
536 gyp_defines.append('disable_cross_trusted=1') | 551 gyp_defines.append('disable_cross_trusted=1') |
537 if getos.GetPlatform() == 'mac': | 552 if getos.GetPlatform() == 'mac': |
538 gyp_defines.append('clang=1') | 553 gyp_defines.append('clang=1') |
539 | 554 |
540 gyp_env['GYP_DEFINES'] = ' '.join(gyp_defines) | 555 gyp_env['GYP_DEFINES'] = ' '.join(gyp_defines) |
541 # We can't use windows path separators in GYP_GENERATOR_FLAGS since | 556 # We can't use windows path separators in GYP_GENERATOR_FLAGS since |
542 # gyp uses shlex to parse them and treats '\' as an escape char. | 557 # gyp uses shlex to parse them and treats '\' as an escape char. |
543 gyp_env['GYP_GENERATOR_FLAGS'] = 'output_dir=%s' % out_dir.replace('\\', '/') | 558 gyp_env['GYP_GENERATOR_FLAGS'] = 'output_dir=%s' % out_dir.replace('\\', '/') |
544 | 559 |
545 # Print relevant environment variables | 560 # Print relevant environment variables |
546 for key, value in gyp_env.iteritems(): | 561 for key, value in gyp_env.iteritems(): |
547 if key.startswith('GYP') or key in ('CC',): | 562 if key.startswith('GYP') or key in ('CC',): |
548 print '%s="%s"' % (key, value) | 563 print ' %s="%s"' % (key, value) |
549 | 564 |
550 buildbot_common.Run( | 565 buildbot_common.Run( |
551 [sys.executable, gyp_py_script, gyp_file, '--depth=.'], | 566 [sys.executable, gyp_py_script, gyp_file, '--depth=.'], |
552 cwd=SRC_DIR, | 567 cwd=SRC_DIR, |
553 env=gyp_env) | 568 env=gyp_env) |
554 | 569 |
555 NinjaBuild(targets, out_dir, arch) | 570 NinjaBuild(targets, out_dir, arch) |
556 | 571 |
557 | 572 |
558 def NinjaBuild(targets, out_dir, arch): | 573 def NinjaBuild(targets, out_dir, arch): |
(...skipping 15 matching lines...) Expand all Loading... | |
574 GypNinjaBuild_Breakpad(GYPBUILD_DIR + '-x64') | 589 GypNinjaBuild_Breakpad(GYPBUILD_DIR + '-x64') |
575 | 590 |
576 if set(toolchains) & set(['glibc', 'newlib']): | 591 if set(toolchains) & set(['glibc', 'newlib']): |
577 GypNinjaBuild_PPAPI('ia32', GYPBUILD_DIR + '-ia32') | 592 GypNinjaBuild_PPAPI('ia32', GYPBUILD_DIR + '-ia32') |
578 GypNinjaBuild_PPAPI('x64', GYPBUILD_DIR + '-x64') | 593 GypNinjaBuild_PPAPI('x64', GYPBUILD_DIR + '-x64') |
579 | 594 |
580 if 'arm' in toolchains: | 595 if 'arm' in toolchains: |
581 GypNinjaBuild_PPAPI('arm', GYPBUILD_DIR + '-arm') | 596 GypNinjaBuild_PPAPI('arm', GYPBUILD_DIR + '-arm') |
582 | 597 |
583 if 'pnacl' in toolchains: | 598 if 'pnacl' in toolchains: |
599 GypNinjaBuild_PPAPI('ia32', GYPBUILD_DIR + '-clang-ia32', | |
600 ['use_nacl_clang=1']) | |
601 GypNinjaBuild_PPAPI('x64', GYPBUILD_DIR + '-clang-x64', | |
602 ['use_nacl_clang=1']) | |
bradn
2015/02/17 20:21:47
arm?
Sam Clegg
2015/02/17 20:31:12
When I started this change there was no arm suppor
| |
603 | |
584 # NOTE: For ia32, gyp builds both x86-32 and x86-64 by default. | 604 # NOTE: For ia32, gyp builds both x86-32 and x86-64 by default. |
585 for arch in ('ia32', 'arm'): | 605 for arch in ('ia32', 'arm'): |
586 # Fill in the latest native pnacl shim library from the chrome build. | 606 # Fill in the latest native pnacl shim library from the chrome build. |
587 build_dir = GYPBUILD_DIR + '-pnacl-' + arch | 607 build_dir = GYPBUILD_DIR + '-pnacl-' + arch |
588 GypNinjaBuild_Pnacl(build_dir, arch) | 608 GypNinjaBuild_Pnacl(build_dir, arch) |
589 | 609 |
590 GypNinjaInstall(pepperdir, toolchains) | 610 GypNinjaInstall(pepperdir, toolchains) |
591 | 611 |
592 platform = getos.GetPlatform() | 612 platform = getos.GetPlatform() |
593 newlibdir = os.path.join(pepperdir, 'toolchain', platform + '_x86_newlib') | 613 newlibdir = os.path.join(pepperdir, 'toolchain', platform + '_x86_newlib') |
594 glibcdir = os.path.join(pepperdir, 'toolchain', platform + '_x86_glibc') | 614 glibcdir = os.path.join(pepperdir, 'toolchain', platform + '_x86_glibc') |
595 armdir = os.path.join(pepperdir, 'toolchain', platform + '_arm_newlib') | 615 armdir = os.path.join(pepperdir, 'toolchain', platform + '_arm_newlib') |
596 pnacldir = os.path.join(pepperdir, 'toolchain', platform + '_pnacl') | 616 pnacldir = os.path.join(pepperdir, 'toolchain', platform + '_pnacl') |
597 bionicdir = os.path.join(pepperdir, 'toolchain', platform + '_arm_bionic') | 617 bionicdir = os.path.join(pepperdir, 'toolchain', platform + '_arm_bionic') |
598 | 618 |
619 | |
599 if 'newlib' in toolchains: | 620 if 'newlib' in toolchains: |
600 InstallNaClHeaders(GetToolchainNaClInclude('newlib', newlibdir, 'x86'), | 621 InstallNaClHeaders(GetToolchainNaClInclude('newlib', newlibdir, 'x86'), |
601 'newlib') | 622 'newlib') |
602 | 623 |
603 if 'glibc' in toolchains: | 624 if 'glibc' in toolchains: |
604 InstallNaClHeaders(GetToolchainNaClInclude('glibc', glibcdir, 'x86'), | 625 InstallNaClHeaders(GetToolchainNaClInclude('glibc', glibcdir, 'x86'), |
605 'glibc') | 626 'glibc') |
606 | 627 |
607 if 'arm' in toolchains: | 628 if 'arm' in toolchains: |
608 InstallNaClHeaders(GetToolchainNaClInclude('newlib', armdir, 'arm'), | 629 InstallNaClHeaders(GetToolchainNaClInclude('newlib', armdir, 'arm'), |
(...skipping 21 matching lines...) Expand all Loading... | |
630 | 651 |
631 pnacl_translator_lib_dir = GetPNaClTranslatorLib(pnacldir, nacl_arch) | 652 pnacl_translator_lib_dir = GetPNaClTranslatorLib(pnacldir, nacl_arch) |
632 if not os.path.isdir(pnacl_translator_lib_dir): | 653 if not os.path.isdir(pnacl_translator_lib_dir): |
633 buildbot_common.ErrorExit('Expected %s directory to exist.' % | 654 buildbot_common.ErrorExit('Expected %s directory to exist.' % |
634 pnacl_translator_lib_dir) | 655 pnacl_translator_lib_dir) |
635 | 656 |
636 buildbot_common.CopyFile( | 657 buildbot_common.CopyFile( |
637 os.path.join(release_build_dir, 'libpnacl_irt_shim.a'), | 658 os.path.join(release_build_dir, 'libpnacl_irt_shim.a'), |
638 pnacl_translator_lib_dir) | 659 pnacl_translator_lib_dir) |
639 | 660 |
661 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'pnacl'), | |
662 'pnacl') | |
bradn
2015/02/17 20:21:48
Why do these both have pnacl on the end?
Sam Clegg
2015/02/17 20:31:12
See NACL_HEADER_MAP.
In both cases the set of hea
| |
640 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'x86'), | 663 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'x86'), |
641 'newlib') | 664 'pnacl') |
642 | 665 |
643 | 666 |
644 def MakeDirectoryOrClobber(pepperdir, dirname, clobber): | 667 def MakeDirectoryOrClobber(pepperdir, dirname, clobber): |
645 dirpath = os.path.join(pepperdir, dirname) | 668 dirpath = os.path.join(pepperdir, dirname) |
646 if clobber: | 669 if clobber: |
647 buildbot_common.RemoveDir(dirpath) | 670 buildbot_common.RemoveDir(dirpath) |
648 buildbot_common.MakeDir(dirpath) | 671 buildbot_common.MakeDir(dirpath) |
649 | 672 |
650 return dirpath | 673 return dirpath |
651 | 674 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
725 | 748 |
726 if not os.path.isabs(output_filename): | 749 if not os.path.isabs(output_filename): |
727 output_filename = os.path.join(fileroot, output_filename) | 750 output_filename = os.path.join(fileroot, output_filename) |
728 generate_notice.Generate(output_filename, fileroot, license_files) | 751 generate_notice.Generate(output_filename, fileroot, license_files) |
729 | 752 |
730 | 753 |
731 def BuildStepVerifyFilelist(pepperdir): | 754 def BuildStepVerifyFilelist(pepperdir): |
732 buildbot_common.BuildStep('Verify SDK Files') | 755 buildbot_common.BuildStep('Verify SDK Files') |
733 file_list_path = os.path.join(SCRIPT_DIR, 'sdk_files.list') | 756 file_list_path = os.path.join(SCRIPT_DIR, 'sdk_files.list') |
734 try: | 757 try: |
758 print 'SDK directory: %s' % pepperdir | |
735 verify_filelist.Verify(file_list_path, pepperdir) | 759 verify_filelist.Verify(file_list_path, pepperdir) |
736 print 'OK' | 760 print 'OK' |
737 except verify_filelist.ParseException, e: | 761 except verify_filelist.ParseException, e: |
738 buildbot_common.ErrorExit('Parsing sdk_files.list failed:\n\n%s' % e) | 762 buildbot_common.ErrorExit('Parsing sdk_files.list failed:\n\n%s' % e) |
739 except verify_filelist.VerifyException, e: | 763 except verify_filelist.VerifyException, e: |
740 file_list_rel = os.path.relpath(file_list_path) | 764 file_list_rel = os.path.relpath(file_list_path) |
741 verify_filelist_py = os.path.splitext(verify_filelist.__file__)[0] + '.py' | 765 verify_filelist_py = os.path.splitext(verify_filelist.__file__)[0] + '.py' |
742 verify_filelist_py = os.path.relpath(verify_filelist_py) | 766 verify_filelist_py = os.path.relpath(verify_filelist_py) |
743 pepperdir_rel = os.path.relpath(pepperdir) | 767 pepperdir_rel = os.path.relpath(pepperdir) |
744 | 768 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
977 options.archive = True | 1001 options.archive = True |
978 options.build_ports = True | 1002 options.build_ports = True |
979 # TODO(binji): re-enable app_engine build when the linux builder stops | 1003 # TODO(binji): re-enable app_engine build when the linux builder stops |
980 # breaking when trying to git clone from github. | 1004 # breaking when trying to git clone from github. |
981 # See http://crbug.com/412969. | 1005 # See http://crbug.com/412969. |
982 options.build_app_engine = False | 1006 options.build_app_engine = False |
983 options.tar = True | 1007 options.tar = True |
984 | 1008 |
985 # NOTE: order matters here. This will be the order that is specified in the | 1009 # NOTE: order matters here. This will be the order that is specified in the |
986 # Makefiles; the first toolchain will be the default. | 1010 # Makefiles; the first toolchain will be the default. |
987 toolchains = ['pnacl', 'newlib', 'glibc', 'arm', 'host'] | 1011 toolchains = ['pnacl', 'newlib', 'glibc', 'arm', 'clang-newlib', 'host'] |
988 | 1012 |
989 # Changes for experimental bionic builder | 1013 # Changes for experimental bionic builder |
990 if options.bionic: | 1014 if options.bionic: |
991 toolchains.append('bionic') | 1015 toolchains.append('bionic') |
992 options.build_ports = False | 1016 options.build_ports = False |
993 options.build_app_engine = False | 1017 options.build_app_engine = False |
994 | 1018 |
995 print 'Building: ' + ' '.join(toolchains) | 1019 print 'Building: ' + ' '.join(toolchains) |
996 | 1020 |
997 if options.archive and not options.tar: | 1021 if options.archive and not options.tar: |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1079 BuildStepArchiveSDKTools() | 1103 BuildStepArchiveSDKTools() |
1080 | 1104 |
1081 return 0 | 1105 return 0 |
1082 | 1106 |
1083 | 1107 |
1084 if __name__ == '__main__': | 1108 if __name__ == '__main__': |
1085 try: | 1109 try: |
1086 sys.exit(main(sys.argv[1:])) | 1110 sys.exit(main(sys.argv[1:])) |
1087 except KeyboardInterrupt: | 1111 except KeyboardInterrupt: |
1088 buildbot_common.ErrorExit('build_sdk: interrupted') | 1112 buildbot_common.ErrorExit('build_sdk: interrupted') |
OLD | NEW |