| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 if not os.path.exists(options.goma_cache_dir): | 103 if not os.path.exists(options.goma_cache_dir): |
| 104 os.mkdir(options.goma_cache_dir, 0700) | 104 os.mkdir(options.goma_cache_dir, 0700) |
| 105 env['GOMA_CACHE_DIR'] = options.goma_cache_dir | 105 env['GOMA_CACHE_DIR'] = options.goma_cache_dir |
| 106 | 106 |
| 107 # Enable DepsCache. DepsCache caches the list of files to send goma server. | 107 # Enable DepsCache. DepsCache caches the list of files to send goma server. |
| 108 # This will greatly improve build speed when cache is warmed. | 108 # This will greatly improve build speed when cache is warmed. |
| 109 # The cache file is stored in the target output directory. | 109 # The cache file is stored in the target output directory. |
| 110 env['GOMA_DEPS_CACHE_DIR'] = ( | 110 env['GOMA_DEPS_CACHE_DIR'] = ( |
| 111 options.goma_deps_cache_dir or options.target_output_dir) | 111 options.goma_deps_cache_dir or options.target_output_dir) |
| 112 | 112 |
| 113 # HACK(shinyak): Workaround for crbug.com/630502. Compiling |
| 114 # tools/ipc_fuzzer/message_lib/message_names.cc is always slow on Mac. |
| 115 # TODO(shinyak): Remove this when gn configuration is fixed. |
| 116 if chromium_utils.IsMac(): |
| 117 env['GOMA_FALLBACK_INPUT_FILES'] = ( |
| 118 '../../tools/ipc_fuzzer/message_lib/message_names.cc') |
| 119 |
| 113 if options.goma_hermetic: | 120 if options.goma_hermetic: |
| 114 env['GOMA_HERMETIC'] = options.goma_hermetic | 121 env['GOMA_HERMETIC'] = options.goma_hermetic |
| 115 if options.goma_enable_remote_link: | 122 if options.goma_enable_remote_link: |
| 116 env['GOMA_ENABLE_REMOTE_LINK'] = options.goma_enable_remote_link | 123 env['GOMA_ENABLE_REMOTE_LINK'] = options.goma_enable_remote_link |
| 117 if options.goma_store_local_run_output: | 124 if options.goma_store_local_run_output: |
| 118 env['GOMA_STORE_LOCAL_RUN_OUTPUT'] = options.goma_store_local_run_output | 125 env['GOMA_STORE_LOCAL_RUN_OUTPUT'] = options.goma_store_local_run_output |
| 119 if options.goma_enable_compiler_info_cache: | 126 if options.goma_enable_compiler_info_cache: |
| 120 # Will be stored in GOMA_CACHE_DIR. | 127 # Will be stored in GOMA_CACHE_DIR. |
| 121 env['GOMA_COMPILER_INFO_CACHE_FILE'] = 'goma-compiler-info.cache' | 128 env['GOMA_COMPILER_INFO_CACHE_FILE'] = 'goma-compiler-info.cache' |
| 122 | 129 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 exit_status = main_ninja(options, args, env) | 541 exit_status = main_ninja(options, args, env) |
| 535 | 542 |
| 536 # stop goma | 543 # stop goma |
| 537 goma_teardown(options, env, exit_status, goma_cloudtail) | 544 goma_teardown(options, env, exit_status, goma_cloudtail) |
| 538 | 545 |
| 539 return exit_status | 546 return exit_status |
| 540 | 547 |
| 541 | 548 |
| 542 if '__main__' == __name__: | 549 if '__main__' == __name__: |
| 543 sys.exit(real_main()) | 550 sys.exit(real_main()) |
| OLD | NEW |