Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # This script is wrapper for Chromium that adds some support for how GYP | 7 # This script is wrapper for Chromium that adds some support for how GYP |
| 8 # is invoked by Chromium beyond what can be done in the gclient hooks. | 8 # is invoked by Chromium beyond what can be done in the gclient hooks. |
| 9 | 9 |
| 10 import glob | 10 import glob |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 for supplement in supplemental_files: | 183 for supplement in supplemental_files: |
| 184 AddInclude(supplement) | 184 AddInclude(supplement) |
| 185 | 185 |
| 186 return result | 186 return result |
| 187 | 187 |
| 188 | 188 |
| 189 if __name__ == '__main__': | 189 if __name__ == '__main__': |
| 190 args = sys.argv[1:] | 190 args = sys.argv[1:] |
| 191 | 191 |
| 192 # TODO(sky): remove analyzer2 once updated recipes. | 192 # TODO(sky): remove analyzer2 once updated recipes. |
| 193 use_analyzer = len(args) and args[0] == '--analyzer' | 193 use_analyzer = len(args) and (args[0] == '--analyzer' or |
| 194 args[0] == '--analyzer2') | |
| 194 if use_analyzer: | 195 if use_analyzer: |
| 195 args.pop(0) | 196 args.pop(0) |
| 196 os.environ['GYP_GENERATORS'] = 'analyzer' | 197 os.environ['GYP_GENERATORS'] = 'analyzer' |
| 197 args.append('-Gfile_path=' + args.pop(0)) | |
| 198 elif len(args) and args[0] == '--analyzer2': | |
| 199 use_analyzer = True | |
| 200 args.pop(0) | |
| 201 os.environ['GYP_GENERATORS'] = 'analyzer' | |
| 202 args.append('-Gconfig_path=' + args.pop(0)) | 198 args.append('-Gconfig_path=' + args.pop(0)) |
| 203 args.append('-Ganalyzer_output_path=' + args.pop(0)) | 199 args.append('-Ganalyzer_output_path=' + args.pop(0)) |
|
Nico
2014/08/07 21:37:09
lgtm assuming args always has at least 2 elements
| |
| 204 | 200 |
| 205 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): | 201 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): |
| 206 # Check for landmines (reasons to clobber the build) in any case. | 202 # Check for landmines (reasons to clobber the build) in any case. |
| 207 print 'Running build/landmines.py...' | 203 print 'Running build/landmines.py...' |
| 208 subprocess.check_call( | 204 subprocess.check_call( |
| 209 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 205 [sys.executable, os.path.join(script_dir, 'landmines.py')]) |
| 210 print 'Skipping gyp_chromium due to GYP_CHROMIUM_NO_ACTION env var.' | 206 print 'Skipping gyp_chromium due to GYP_CHROMIUM_NO_ACTION env var.' |
| 211 sys.exit(0) | 207 sys.exit(0) |
| 212 | 208 |
| 213 # Use the Psyco JIT if available. | 209 # Use the Psyco JIT if available. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 335 subprocess.check_call( | 331 subprocess.check_call( |
| 336 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 332 [sys.executable, os.path.join(script_dir, 'landmines.py')]) |
| 337 | 333 |
| 338 if vs2013_runtime_dll_dirs: | 334 if vs2013_runtime_dll_dirs: |
| 339 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 335 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
| 340 vs_toolchain.CopyVsRuntimeDlls( | 336 vs_toolchain.CopyVsRuntimeDlls( |
| 341 os.path.join(chrome_src, GetOutputDirectory()), | 337 os.path.join(chrome_src, GetOutputDirectory()), |
| 342 (x86_runtime, x64_runtime)) | 338 (x86_runtime, x64_runtime)) |
| 343 | 339 |
| 344 sys.exit(gyp_rc) | 340 sys.exit(gyp_rc) |
| OLD | NEW |