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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 gyp_defines += ['armv7=1', 'arm_thumb=0', 'arm_neon=1'] | 540 gyp_defines += ['armv7=1', 'arm_thumb=0', 'arm_neon=1'] |
541 if force_arm_gcc: | 541 if force_arm_gcc: |
542 gyp_defines += ['nacl_enable_arm_gcc=1'] | 542 gyp_defines += ['nacl_enable_arm_gcc=1'] |
543 | 543 |
544 gyp_env['GYP_DEFINES'] = ' '.join(gyp_defines) | 544 gyp_env['GYP_DEFINES'] = ' '.join(gyp_defines) |
545 for key in ['GYP_GENERATORS', 'GYP_DEFINES']: | 545 for key in ['GYP_GENERATORS', 'GYP_DEFINES']: |
546 value = gyp_env[key] | 546 value = gyp_env[key] |
547 print '%s="%s"' % (key, value) | 547 print '%s="%s"' % (key, value) |
548 gyp_generator_flags = ['-G', 'output_dir=%s' % (out_dir,)] | 548 gyp_generator_flags = ['-G', 'output_dir=%s' % (out_dir,)] |
549 gyp_depth = '--depth=.' | 549 gyp_depth = '--depth=.' |
550 buildbot_common.Run( | 550 cmd = [sys.executable, gyp_py_script, gyp_file, gyp_depth] |
551 [sys.executable, gyp_py_script, gyp_file, gyp_depth] + \ | 551 # Hack added to fix M32 branch windows_sdk_multirel bot, without having to |
552 gyp_generator_flags, | 552 # branch the native_client repo. |
553 cwd=SRC_DIR, | 553 # TODO(binji): remove after I drover the change to 1700 branch. |
554 env=gyp_env) | 554 cmd.append('--no-parallel') |
| 555 cmd.extend(gyp_generator_flags) |
| 556 buildbot_common.Run(cmd, cwd=SRC_DIR, env=gyp_env) |
555 NinjaBuild(targets, out_dir) | 557 NinjaBuild(targets, out_dir) |
556 | 558 |
557 | 559 |
558 def NinjaBuild(targets, out_dir): | 560 def NinjaBuild(targets, out_dir): |
559 if type(targets) is not list: | 561 if type(targets) is not list: |
560 targets = [targets] | 562 targets = [targets] |
561 out_config_dir = os.path.join(out_dir, 'Release') | 563 out_config_dir = os.path.join(out_dir, 'Release') |
562 buildbot_common.Run(['ninja', '-C', out_config_dir] + targets, cwd=SRC_DIR) | 564 buildbot_common.Run(['ninja', '-C', out_config_dir] + targets, cwd=SRC_DIR) |
563 | 565 |
564 | 566 |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 BuildStepArchiveSDKTools() | 981 BuildStepArchiveSDKTools() |
980 | 982 |
981 return 0 | 983 return 0 |
982 | 984 |
983 | 985 |
984 if __name__ == '__main__': | 986 if __name__ == '__main__': |
985 try: | 987 try: |
986 sys.exit(main(sys.argv)) | 988 sys.exit(main(sys.argv)) |
987 except KeyboardInterrupt: | 989 except KeyboardInterrupt: |
988 buildbot_common.ErrorExit('build_sdk: interrupted') | 990 buildbot_common.ErrorExit('build_sdk: interrupted') |
OLD | NEW |