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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 # Optionally add supplemental .gypi files if present. | 182 # Optionally add supplemental .gypi files if present. |
| 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 use_analyzer = len(args) and args[0] == '--analyzer' | |
| 193 if use_analyzer: | |
| 194 args.pop(0) | |
| 195 os.environ['GYP_GENERATORS'] = 'analyzer' | |
| 196 args.append('-Gfile_path=' + args.pop(0)) | |
| 197 | |
| 192 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): | 198 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): |
| 193 # Check for landmines (reasons to clobber the build) in any case. | 199 # Check for landmines (reasons to clobber the build) in any case. |
| 194 print 'Running build/landmines.py...' | 200 print 'Running build/landmines.py...' |
| 195 subprocess.check_call( | 201 subprocess.check_call( |
| 196 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 202 [sys.executable, os.path.join(script_dir, 'landmines.py')]) |
| 197 print 'Skipping gyp_chromium due to GYP_CHROMIUM_NO_ACTION env var.' | 203 print 'Skipping gyp_chromium due to GYP_CHROMIUM_NO_ACTION env var.' |
| 198 sys.exit(0) | 204 sys.exit(0) |
| 199 | 205 |
| 200 # Use the Psyco JIT if available. | 206 # Use the Psyco JIT if available. |
| 201 if psyco: | 207 if psyco: |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 300 'GYP_CROSSCOMPILE' not in os.environ)): | 306 'GYP_CROSSCOMPILE' not in os.environ)): |
| 301 os.environ['GYP_CROSSCOMPILE'] = '1' | 307 os.environ['GYP_CROSSCOMPILE'] = '1' |
| 302 if gyp_vars_dict.get('OS') == 'android': | 308 if gyp_vars_dict.get('OS') == 'android': |
| 303 args.append('--check') | 309 args.append('--check') |
| 304 | 310 |
| 305 args.extend( | 311 args.extend( |
| 306 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) | 312 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) |
| 307 | 313 |
| 308 args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) | 314 args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) |
| 309 | 315 |
| 310 print 'Updating projects from gyp files...' | 316 if not use_analyzer: |
| 311 sys.stdout.flush() | 317 print 'Updating projects from gyp files...' |
| 318 sys.stdout.flush() | |
| 312 | 319 |
| 313 # Off we go... | 320 # Off we go... |
| 314 gyp_rc = gyp.main(args) | 321 gyp_rc = gyp.main(args) |
| 315 | 322 |
| 316 # Check for landmines (reasons to clobber the build). This must be run here, | 323 if not use_analyzer: |
|
kjellander_chromium
2015/09/28 17:43:05
May I ask why it's skipping copying of the runtime
| |
| 317 # rather than a separate runhooks step so that any environment modifications | 324 # Check for landmines (reasons to clobber the build). This must be run here, |
| 318 # from above are picked up. | 325 # rather than a separate runhooks step so that any environment modifications |
| 319 print 'Running build/landmines.py...' | 326 # from above are picked up. |
| 320 subprocess.check_call( | 327 print 'Running build/landmines.py...' |
| 328 subprocess.check_call( | |
| 321 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 329 [sys.executable, os.path.join(script_dir, 'landmines.py')]) |
| 322 | 330 |
| 323 if vs2013_runtime_dll_dirs: | 331 if vs2013_runtime_dll_dirs: |
| 324 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 332 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
| 325 vs_toolchain.CopyVsRuntimeDlls( | 333 vs_toolchain.CopyVsRuntimeDlls( |
| 326 os.path.join(chrome_src, GetOutputDirectory()), | 334 os.path.join(chrome_src, GetOutputDirectory()), |
| 327 (x86_runtime, x64_runtime)) | 335 (x86_runtime, x64_runtime)) |
| 328 | 336 |
| 329 sys.exit(gyp_rc) | 337 sys.exit(gyp_rc) |
| OLD | NEW |