OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 else: | 449 else: |
450 command = ['python', '../third_party/scons/scons.py'] | 450 command = ['python', '../third_party/scons/scons.py'] |
451 | 451 |
452 env = os.environ.copy() | 452 env = os.environ.copy() |
453 if sys.platform == 'linux2': | 453 if sys.platform == 'linux2': |
454 common_linux_settings(command, options, env) | 454 common_linux_settings(command, options, env) |
455 else: | 455 else: |
456 command.extend(['-k']) | 456 command.extend(['-k']) |
457 | 457 |
458 command.extend([ | 458 command.extend([ |
459 # Force scons to always check for dependency changes. | |
460 'mode=' + options.target, | 459 'mode=' + options.target, |
461 'sample=shell' | 460 'd8' |
462 ]) | 461 ]) |
463 | 462 |
464 command.extend(options.build_args + args) | 463 command.extend(options.build_args + args) |
465 return chromium_utils.RunCommand(command, env=env) | 464 return chromium_utils.RunCommand(command, env=env) |
466 | 465 |
467 | 466 |
468 | 467 |
469 def main_win(options, args): | 468 def main_win(options, args): |
470 """Interprets options, clobbers object files, and calls the build tool. | 469 """Interprets options, clobbers object files, and calls the build tool. |
471 """ | 470 """ |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 main = build_tool_map.get(options.build_tool) | 660 main = build_tool_map.get(options.build_tool) |
662 if not main: | 661 if not main: |
663 sys.stderr.write('Unknown build tool %s.\n' % repr(options.build_tool)) | 662 sys.stderr.write('Unknown build tool %s.\n' % repr(options.build_tool)) |
664 return 2 | 663 return 2 |
665 | 664 |
666 return main(options, args) | 665 return main(options, args) |
667 | 666 |
668 | 667 |
669 if '__main__' == __name__: | 668 if '__main__' == __name__: |
670 sys.exit(real_main()) | 669 sys.exit(real_main()) |
OLD | NEW |