| 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 option_parser = optparse.OptionParser() | 483 option_parser = optparse.OptionParser() |
| 484 option_parser.add_option('--clobber', action='store_true', default=False, | 484 option_parser.add_option('--clobber', action='store_true', default=False, |
| 485 help='delete the output directory before compiling') | 485 help='delete the output directory before compiling') |
| 486 option_parser.add_option('--target', default='Release', | 486 option_parser.add_option('--target', default='Release', |
| 487 help='build target (Debug or Release)') | 487 help='build target (Debug or Release)') |
| 488 option_parser.add_option('--src-dir', default=None, | 488 option_parser.add_option('--src-dir', default=None, |
| 489 help='path to the root of the source tree') | 489 help='path to the root of the source tree') |
| 490 option_parser.add_option('--mode', default='dev', | 490 option_parser.add_option('--mode', default='dev', |
| 491 help='build mode (dev or official) controlling ' | 491 help='build mode (dev or official) controlling ' |
| 492 'environment variables set during build') | 492 'environment variables set during build') |
| 493 # TODO(thakis): Remove this once bots no longer pass it in. | 493 # TODO(thakis): Remove this, https://crbug.com/622768 |
| 494 option_parser.add_option('--build-tool', default=None, help='ignored') | 494 option_parser.add_option('--build-tool', default=None, help='ignored') |
| 495 option_parser.add_option('--build-args', action='append', default=[], | 495 option_parser.add_option('--build-args', action='append', default=[], |
| 496 help='arguments to pass to the build tool') | 496 help='arguments to pass to the build tool') |
| 497 option_parser.add_option('--build-data-dir', action='store', | 497 option_parser.add_option('--build-data-dir', action='store', |
| 498 help='specify a build data directory.') | 498 help='specify a build data directory.') |
| 499 option_parser.add_option('--compiler', default=None, | 499 option_parser.add_option('--compiler', default=None, |
| 500 help='specify alternative compiler (e.g. clang)') | 500 help='specify alternative compiler (e.g. clang)') |
| 501 if chromium_utils.IsLinux(): | 501 if chromium_utils.IsLinux(): |
| 502 option_parser.add_option('--cros-board', action='store', | 502 option_parser.add_option('--cros-board', action='store', |
| 503 help='If building for the ChromeOS Simple Chrome ' | 503 help='If building for the ChromeOS Simple Chrome ' |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 options.src_dir = os.path.abspath(options.src_dir) | 544 options.src_dir = os.path.abspath(options.src_dir) |
| 545 | 545 |
| 546 options.target_output_dir = get_target_build_dir(args, options) | 546 options.target_output_dir = get_target_build_dir(args, options) |
| 547 | 547 |
| 548 assert options.build_tool in (None, 'ninja') | 548 assert options.build_tool in (None, 'ninja') |
| 549 return main_ninja(options, args) | 549 return main_ninja(options, args) |
| 550 | 550 |
| 551 | 551 |
| 552 if '__main__' == __name__: | 552 if '__main__' == __name__: |
| 553 sys.exit(real_main()) | 553 sys.exit(real_main()) |
| OLD | NEW |