| 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 """A tool to build chrome, executed by buildbot. | 6 """A tool to build chrome, executed by buildbot. |
| 7 | 7 |
| 8 When this is run, the current directory (cwd) should be the outer build | 8 When this is run, the current directory (cwd) should be the outer build |
| 9 directory (e.g., chrome-release/build/). | 9 directory (e.g., chrome-release/build/). |
| 10 | 10 |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 Args: | 393 Args: |
| 394 options (Option): options for ninja command. | 394 options (Option): options for ninja command. |
| 395 args (str): extra args for ninja command. | 395 args (str): extra args for ninja command. |
| 396 env (dict): Used when ninja command executes. | 396 env (dict): Used when ninja command executes. |
| 397 | 397 |
| 398 Returns: | 398 Returns: |
| 399 int: ninja command exit status. | 399 int: ninja command exit status. |
| 400 | 400 |
| 401 """ | 401 """ |
| 402 | 402 |
| 403 exit_status = -1 |
| 404 |
| 403 try: | 405 try: |
| 404 print 'chdir to %s' % options.src_dir | 406 print 'chdir to %s' % options.src_dir |
| 405 os.chdir(options.src_dir) | 407 os.chdir(options.src_dir) |
| 406 | 408 |
| 407 command = [options.ninja_path, '-w', 'dupbuild=err', | 409 command = [options.ninja_path, '-w', 'dupbuild=err', |
| 408 '-C', options.target_output_dir] | 410 '-C', options.target_output_dir] |
| 409 | 411 |
| 410 # HACK(yyanagisawa): update environment files on |env| update. | 412 # HACK(yyanagisawa): update environment files on |env| update. |
| 411 # For compiling on Windows, environment in environment files are used. | 413 # For compiling on Windows, environment in environment files are used. |
| 412 # It means even if enviroment such as GOMA_DISABLED is updated in | 414 # It means even if enviroment such as GOMA_DISABLED is updated in |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 exit_status = main_ninja(options, args, env) | 572 exit_status = main_ninja(options, args, env) |
| 571 | 573 |
| 572 # stop goma | 574 # stop goma |
| 573 goma_teardown(options, env, exit_status, goma_cloudtail) | 575 goma_teardown(options, env, exit_status, goma_cloudtail) |
| 574 | 576 |
| 575 return exit_status | 577 return exit_status |
| 576 | 578 |
| 577 | 579 |
| 578 if '__main__' == __name__: | 580 if '__main__' == __name__: |
| 579 sys.exit(real_main()) | 581 sys.exit(real_main()) |
| OLD | NEW |