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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 495 |
496 def GypNinjaBuild_Pnacl(rel_out_dir, target_arch): | 496 def GypNinjaBuild_Pnacl(rel_out_dir, target_arch): |
497 # TODO(binji): This will build the pnacl_irt_shim twice; once as part of the | 497 # TODO(binji): This will build the pnacl_irt_shim twice; once as part of the |
498 # Chromium build, and once here. When we move more of the SDK build process | 498 # Chromium build, and once here. When we move more of the SDK build process |
499 # to gyp, we can remove this. | 499 # to gyp, we can remove this. |
500 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') | 500 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') |
501 | 501 |
502 out_dir = MakeNinjaRelPath(rel_out_dir) | 502 out_dir = MakeNinjaRelPath(rel_out_dir) |
503 gyp_file = os.path.join(SRC_DIR, 'ppapi', 'native_client', 'src', | 503 gyp_file = os.path.join(SRC_DIR, 'ppapi', 'native_client', 'src', |
504 'untrusted', 'pnacl_irt_shim', 'pnacl_irt_shim.gyp') | 504 'untrusted', 'pnacl_irt_shim', 'pnacl_irt_shim.gyp') |
505 targets = ['pnacl_irt_shim_aot'] | 505 targets = ['shim_aot'] |
506 GypNinjaBuild(target_arch, gyp_py, gyp_file, targets, out_dir, False) | 506 GypNinjaBuild(target_arch, gyp_py, gyp_file, targets, out_dir, False) |
507 | 507 |
508 | 508 |
509 def GypNinjaBuild(arch, gyp_py_script, gyp_file, targets, | 509 def GypNinjaBuild(arch, gyp_py_script, gyp_file, targets, |
510 out_dir, force_arm_gcc=True): | 510 out_dir, force_arm_gcc=True): |
511 gyp_env = dict(os.environ) | 511 gyp_env = dict(os.environ) |
512 gyp_env['GYP_GENERATORS'] = 'ninja' | 512 gyp_env['GYP_GENERATORS'] = 'ninja' |
513 gyp_defines = [] | 513 gyp_defines = [] |
514 if options.mac_sdk: | 514 if options.mac_sdk: |
515 gyp_defines.append('mac_sdk=%s' % options.mac_sdk) | 515 gyp_defines.append('mac_sdk=%s' % options.mac_sdk) |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 BuildStepArchiveSDKTools() | 1023 BuildStepArchiveSDKTools() |
1024 | 1024 |
1025 return 0 | 1025 return 0 |
1026 | 1026 |
1027 | 1027 |
1028 if __name__ == '__main__': | 1028 if __name__ == '__main__': |
1029 try: | 1029 try: |
1030 sys.exit(main(sys.argv)) | 1030 sys.exit(main(sys.argv)) |
1031 except KeyboardInterrupt: | 1031 except KeyboardInterrupt: |
1032 buildbot_common.ErrorExit('build_sdk: interrupted') | 1032 buildbot_common.ErrorExit('build_sdk: interrupted') |
1033 | |
OLD | NEW |