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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 # Caches CRLs in GOMA_CACHE_DIR. | 157 # Caches CRLs in GOMA_CACHE_DIR. |
158 # Since downloading CRLs is usually slow, caching them may improves | 158 # Since downloading CRLs is usually slow, caching them may improves |
159 # compiler_proxy start time. | 159 # compiler_proxy start time. |
160 if not os.path.exists(options.goma_cache_dir): | 160 if not os.path.exists(options.goma_cache_dir): |
161 os.mkdir(options.goma_cache_dir, 0700) | 161 os.mkdir(options.goma_cache_dir, 0700) |
162 env['GOMA_CACHE_DIR'] = options.goma_cache_dir | 162 env['GOMA_CACHE_DIR'] = options.goma_cache_dir |
163 | 163 |
164 # Enable DepsCache. DepsCache caches the list of files to send goma server. | 164 # Enable DepsCache. DepsCache caches the list of files to send goma server. |
165 # This will greatly improve build speed when cache is warmed. | 165 # This will greatly improve build speed when cache is warmed. |
166 # The cache file is stored in the target output directory. | 166 if options.goma_deps_cache_file: |
167 env['GOMA_DEPS_CACHE_DIR'] = ( | 167 env['GOMA_DEPS_CACHE_FILE'] = options.goma_deps_cache_file |
| 168 else: |
| 169 # TODO(shinyak): GOMA_DEPS_CACHE_DIR will be removed from goma in future. |
| 170 # GOMA_DEPS_CACHE_FILE should be used. |
| 171 env['GOMA_DEPS_CACHE_DIR'] = ( |
168 options.goma_deps_cache_dir or options.target_output_dir) | 172 options.goma_deps_cache_dir or options.target_output_dir) |
169 | 173 |
170 if options.goma_hermetic: | 174 if options.goma_hermetic: |
171 env['GOMA_HERMETIC'] = options.goma_hermetic | 175 env['GOMA_HERMETIC'] = options.goma_hermetic |
172 if options.goma_enable_remote_link: | 176 if options.goma_enable_remote_link: |
173 env['GOMA_ENABLE_REMOTE_LINK'] = options.goma_enable_remote_link | 177 env['GOMA_ENABLE_REMOTE_LINK'] = options.goma_enable_remote_link |
174 if options.goma_store_local_run_output: | 178 if options.goma_store_local_run_output: |
175 env['GOMA_STORE_LOCAL_RUN_OUTPUT'] = options.goma_store_local_run_output | 179 env['GOMA_STORE_LOCAL_RUN_OUTPUT'] = options.goma_store_local_run_output |
176 | 180 |
177 if options.build_data_dir: | 181 if options.build_data_dir: |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 help='If building for the ChromeOS Simple Chrome ' | 494 help='If building for the ChromeOS Simple Chrome ' |
491 'workflow, the name of the ChromeOS board.') | 495 'workflow, the name of the ChromeOS board.') |
492 option_parser.add_option('--out-dir', action='store', | 496 option_parser.add_option('--out-dir', action='store', |
493 help='Specify a custom output directory.') | 497 help='Specify a custom output directory.') |
494 option_parser.add_option('--goma-dir', | 498 option_parser.add_option('--goma-dir', |
495 default=os.path.join(BUILD_DIR, 'goma'), | 499 default=os.path.join(BUILD_DIR, 'goma'), |
496 help='specify goma directory') | 500 help='specify goma directory') |
497 option_parser.add_option('--goma-cache-dir', | 501 option_parser.add_option('--goma-cache-dir', |
498 default=DEFAULT_GOMA_CACHE_DIR, | 502 default=DEFAULT_GOMA_CACHE_DIR, |
499 help='specify goma cache directory') | 503 help='specify goma cache directory') |
| 504 option_parser.add_option('--goma-deps-cache-file', |
| 505 help='specify goma deps cache file') |
500 option_parser.add_option('--goma-deps-cache-dir', | 506 option_parser.add_option('--goma-deps-cache-dir', |
501 help='specify goma deps cache directory') | 507 help='specify goma deps cache directory. ' |
| 508 'DEPRECATED. Use --goma-deps-cache-file') |
502 option_parser.add_option('--goma-hermetic', default='error', | 509 option_parser.add_option('--goma-hermetic', default='error', |
503 help='Set goma hermetic mode') | 510 help='Set goma hermetic mode') |
504 option_parser.add_option('--goma-enable-remote-link', default=None, | 511 option_parser.add_option('--goma-enable-remote-link', default=None, |
505 help='Enable goma remote link.') | 512 help='Enable goma remote link.') |
506 option_parser.add_option('--goma-store-local-run-output', default=None, | 513 option_parser.add_option('--goma-store-local-run-output', default=None, |
507 help='Store local run output to goma servers.') | 514 help='Store local run output to goma servers.') |
508 option_parser.add_option('--goma-fail-fast', action='store_true') | 515 option_parser.add_option('--goma-fail-fast', action='store_true') |
509 option_parser.add_option('--goma-disable-local-fallback', action='store_true') | 516 option_parser.add_option('--goma-disable-local-fallback', action='store_true') |
510 option_parser.add_option('--goma-jsonstatus', | 517 option_parser.add_option('--goma-jsonstatus', |
511 help='Specify a file to dump goma_ctl jsonstatus.') | 518 help='Specify a file to dump goma_ctl jsonstatus.') |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 exit_status = main_ninja(options, args, env) | 573 exit_status = main_ninja(options, args, env) |
567 | 574 |
568 # stop goma | 575 # stop goma |
569 goma_teardown(options, env, exit_status, goma_cloudtail) | 576 goma_teardown(options, env, exit_status, goma_cloudtail) |
570 | 577 |
571 return exit_status | 578 return exit_status |
572 | 579 |
573 | 580 |
574 if '__main__' == __name__: | 581 if '__main__' == __name__: |
575 sys.exit(real_main()) | 582 sys.exit(real_main()) |
OLD | NEW |