| 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 |
| 11 import glob | 11 import glob |
| 12 import gyp_environment | 12 import gyp_environment |
| 13 import mac_toolchain |
| 13 import os | 14 import os |
| 14 import re | 15 import re |
| 15 import shlex | 16 import shlex |
| 16 import subprocess | 17 import subprocess |
| 17 import string | 18 import string |
| 18 import sys | 19 import sys |
| 19 import vs_toolchain | 20 import vs_toolchain |
| 20 | 21 |
| 21 script_dir = os.path.dirname(os.path.realpath(__file__)) | 22 script_dir = os.path.dirname(os.path.realpath(__file__)) |
| 22 chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir)) | 23 chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir)) |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 'GYP_CROSSCOMPILE' not in os.environ)): | 309 'GYP_CROSSCOMPILE' not in os.environ)): |
| 309 os.environ['GYP_CROSSCOMPILE'] = '1' | 310 os.environ['GYP_CROSSCOMPILE'] = '1' |
| 310 if gyp_vars_dict.get('OS') == 'android': | 311 if gyp_vars_dict.get('OS') == 'android': |
| 311 args.append('--check') | 312 args.append('--check') |
| 312 | 313 |
| 313 args.extend( | 314 args.extend( |
| 314 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) | 315 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) |
| 315 | 316 |
| 316 args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) | 317 args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) |
| 317 | 318 |
| 319 mac_toolchain_dir = mac_toolchain.GetToolchainDirectory() |
| 320 if mac_toolchain_dir: |
| 321 args.append('-Gmac_toolchain_dir=' + mac_toolchain_dir) |
| 322 |
| 318 if not use_analyzer: | 323 if not use_analyzer: |
| 319 print 'Updating projects from gyp files...' | 324 print 'Updating projects from gyp files...' |
| 320 sys.stdout.flush() | 325 sys.stdout.flush() |
| 321 | 326 |
| 322 # Off we go... | 327 # Off we go... |
| 323 gyp_rc = gyp.main(args) | 328 gyp_rc = gyp.main(args) |
| 324 | 329 |
| 325 if not use_analyzer: | 330 if not use_analyzer: |
| 326 vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() | 331 vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() |
| 327 if vs2013_runtime_dll_dirs: | 332 if vs2013_runtime_dll_dirs: |
| 328 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 333 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
| 329 vs_toolchain.CopyVsRuntimeDlls( | 334 vs_toolchain.CopyVsRuntimeDlls( |
| 330 os.path.join(chrome_src, GetOutputDirectory()), | 335 os.path.join(chrome_src, GetOutputDirectory()), |
| 331 (x86_runtime, x64_runtime)) | 336 (x86_runtime, x64_runtime)) |
| 332 | 337 |
| 333 sys.exit(gyp_rc) | 338 sys.exit(gyp_rc) |
| 334 | 339 |
| 335 if __name__ == '__main__': | 340 if __name__ == '__main__': |
| 336 sys.exit(main()) | 341 sys.exit(main()) |
| OLD | NEW |