Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """This script is wrapper for Chromium that adds some support for how GYP | 5 """This script is wrapper for Chromium that adds some support for how GYP |
| 6 is invoked by Chromium beyond what can be done in the gclient hooks. | 6 is invoked by Chromium beyond what can be done in the gclient hooks. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 import argparse | 9 import argparse |
| 10 import gc | 10 import gc |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 317 args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) | 317 args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) |
| 318 | 318 |
| 319 mac_toolchain_dir = mac_toolchain.GetToolchainDirectory() | 319 mac_toolchain_dir = mac_toolchain.GetToolchainDirectory() |
| 320 if mac_toolchain_dir: | 320 if mac_toolchain_dir: |
| 321 args.append('-Gmac_toolchain_dir=' + mac_toolchain_dir) | 321 args.append('-Gmac_toolchain_dir=' + mac_toolchain_dir) |
| 322 | 322 |
| 323 if not use_analyzer: | 323 if not use_analyzer: |
| 324 print 'Updating projects from gyp files...' | 324 print 'Updating projects from gyp files...' |
| 325 sys.stdout.flush() | 325 sys.stdout.flush() |
| 326 | 326 |
| 327 # TODO(crbug.com/432967) - We are eventually going to switch GYP off | |
| 328 # by default for all Chromium builds, so this list of configurations | |
| 329 # will get broader and broader. | |
| 330 if ('--running-as-hook' in args and | |
| 331 os.environ.get('GYP_CHROMIUM_NO_ACTION', None) != '0' and | |
| 332 (sys.platform.startswith('linux') and not gyp_vars_dict)): | |
| 333 print 'GYP is now disabled in this configuration by default in runhooks.\n' | |
| 334 print 'If you really want to run this, either run it explicitly by hand\n' | |
|
brettw
2016/04/14 21:35:15
"run it" -> "run build/gyp_chromium.py"
Most peopl
| |
| 335 print 'or set the environment variable GYP_CHROMIUM_NO_ACTION=0.' | |
| 336 sys.exit(0) | |
| 337 | |
| 338 if '--running-as-hook' in args: | |
| 339 args.remove('--running-as-hook') | |
| 340 | |
| 327 # Off we go... | 341 # Off we go... |
| 328 gyp_rc = gyp.main(args) | 342 gyp_rc = gyp.main(args) |
| 329 | 343 |
| 330 if not use_analyzer: | 344 if not use_analyzer: |
| 331 vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() | 345 vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() |
| 332 if vs2013_runtime_dll_dirs: | 346 if vs2013_runtime_dll_dirs: |
| 333 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 347 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
| 334 vs_toolchain.CopyVsRuntimeDlls( | 348 vs_toolchain.CopyVsRuntimeDlls( |
| 335 os.path.join(chrome_src, GetOutputDirectory()), | 349 os.path.join(chrome_src, GetOutputDirectory()), |
| 336 (x86_runtime, x64_runtime)) | 350 (x86_runtime, x64_runtime)) |
| 337 | 351 |
| 338 sys.exit(gyp_rc) | 352 sys.exit(gyp_rc) |
| 339 | 353 |
| 340 if __name__ == '__main__': | 354 if __name__ == '__main__': |
| 341 sys.exit(main()) | 355 sys.exit(main()) |
| OLD | NEW |