| 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 lib_dir = 'lib' + bits | 400 lib_dir = 'lib' + bits |
| 401 src_dir = os.path.join(ninja_out_dir, 'gen', tc_dir, lib_dir) | 401 src_dir = os.path.join(ninja_out_dir, 'gen', tc_dir, lib_dir) |
| 402 tcpath = os.path.join(pepperdir, 'toolchain', | 402 tcpath = os.path.join(pepperdir, 'toolchain', |
| 403 '%s_x86_%s' % (platform, tc)) | 403 '%s_x86_%s' % (platform, tc)) |
| 404 dst_dir = GetToolchainNaClLib(tc, tcpath, 'x86', bits) | 404 dst_dir = GetToolchainNaClLib(tc, tcpath, 'x86', bits) |
| 405 | 405 |
| 406 buildbot_common.MakeDir(dst_dir) | 406 buildbot_common.MakeDir(dst_dir) |
| 407 buildbot_common.CopyDir(os.path.join(src_dir, '*.a'), dst_dir) | 407 buildbot_common.CopyDir(os.path.join(src_dir, '*.a'), dst_dir) |
| 408 if tc == 'newlib': | 408 if tc == 'newlib': |
| 409 buildbot_common.CopyDir(os.path.join(src_dir, '*.o'), dst_dir) | 409 buildbot_common.CopyDir(os.path.join(src_dir, '*.o'), dst_dir) |
| 410 # TODO(binji) crt1.o for newlib/32 is installed to a subdirectory for | |
| 411 # some reason. Can this be fixed in the gyp script? | |
| 412 if bits == '32': | |
| 413 buildbot_common.CopyFile(os.path.join(src_dir, '32', 'crt1.o'), | |
| 414 dst_dir) | |
| 415 | 410 |
| 416 if tc == 'glibc': | 411 if tc == 'glibc': |
| 417 buildbot_common.CopyDir(os.path.join(src_dir, '*.so'), dst_dir) | 412 buildbot_common.CopyDir(os.path.join(src_dir, '*.so'), dst_dir) |
| 418 | 413 |
| 414 # TODO(binji): temporary hack; copy crt1.o from sdk toolchain directory. |
| 415 lib_dir = os.path.join(ninja_out_dir, 'gen', 'sdk', 'toolchain', |
| 416 '%s_x86_%s' % (platform, tc), 'x86_64-nacl', 'lib') |
| 417 if bits == '32': |
| 418 lib_dir += '32' |
| 419 buildbot_common.CopyFile(os.path.join(lib_dir, 'crt1.o'), dst_dir) |
| 420 |
| 419 | 421 |
| 420 def GypNinjaBuild_X86_Nacl(platform, rel_out_dir): | 422 def GypNinjaBuild_X86_Nacl(platform, rel_out_dir): |
| 421 gyp_py = os.path.join(NACL_DIR, 'build', 'gyp_nacl') | 423 gyp_py = os.path.join(NACL_DIR, 'build', 'gyp_nacl') |
| 422 nacl_core_sdk_gyp = os.path.join(NACL_DIR, 'build', 'nacl_core_sdk.gyp') | 424 nacl_core_sdk_gyp = os.path.join(NACL_DIR, 'build', 'nacl_core_sdk.gyp') |
| 423 all_gyp = os.path.join(NACL_DIR, 'build', 'all.gyp') | 425 all_gyp = os.path.join(NACL_DIR, 'build', 'all.gyp') |
| 424 | 426 |
| 425 out_dir = MakeNinjaRelPath(rel_out_dir) | 427 out_dir = MakeNinjaRelPath(rel_out_dir) |
| 426 GypNinjaBuild('ia32', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir) | 428 GypNinjaBuild('ia32', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir) |
| 427 GypNinjaBuild('ia32', gyp_py, all_gyp, 'ncval_x86_32', out_dir) | 429 GypNinjaBuild('ia32', gyp_py, all_gyp, 'ncval_x86_32', out_dir) |
| 428 | 430 |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 # Archive on non-trybots. | 1007 # Archive on non-trybots. |
| 1006 if options.archive or buildbot_common.IsSDKBuilder(): | 1008 if options.archive or buildbot_common.IsSDKBuilder(): |
| 1007 BuildStepArchiveBundle(pepper_ver, clnumber, tarfile) | 1009 BuildStepArchiveBundle(pepper_ver, clnumber, tarfile) |
| 1008 BuildStepArchiveSDKTools() | 1010 BuildStepArchiveSDKTools() |
| 1009 | 1011 |
| 1010 return 0 | 1012 return 0 |
| 1011 | 1013 |
| 1012 | 1014 |
| 1013 if __name__ == '__main__': | 1015 if __name__ == '__main__': |
| 1014 sys.exit(main(sys.argv)) | 1016 sys.exit(main(sys.argv)) |
| OLD | NEW |