| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 AddInclude(os.path.join(script_dir, 'common.gypi')) | 181 AddInclude(os.path.join(script_dir, 'common.gypi')) |
| 182 | 182 |
| 183 # Optionally add supplemental .gypi files if present. | 183 # Optionally add supplemental .gypi files if present. |
| 184 for supplement in supplemental_files: | 184 for supplement in supplemental_files: |
| 185 AddInclude(supplement) | 185 AddInclude(supplement) |
| 186 | 186 |
| 187 return result | 187 return result |
| 188 | 188 |
| 189 | 189 |
| 190 if __name__ == '__main__': | 190 if __name__ == '__main__': |
| 191 # Disabling garbage collection saves about 1 second out of 16 on a Linux |
| 192 # z620 workstation. Since this is a short-lived process it's not a problem to |
| 193 # leak a few cyclyc references in order to spare the CPU cycles for |
| 194 # scanning the heap. |
| 195 import gc |
| 196 gc.disable() |
| 197 |
| 191 args = sys.argv[1:] | 198 args = sys.argv[1:] |
| 192 | 199 |
| 193 use_analyzer = len(args) and args[0] == '--analyzer' | 200 use_analyzer = len(args) and args[0] == '--analyzer' |
| 194 if use_analyzer: | 201 if use_analyzer: |
| 195 args.pop(0) | 202 args.pop(0) |
| 196 os.environ['GYP_GENERATORS'] = 'analyzer' | 203 os.environ['GYP_GENERATORS'] = 'analyzer' |
| 197 args.append('-Gconfig_path=' + args.pop(0)) | 204 args.append('-Gconfig_path=' + args.pop(0)) |
| 198 args.append('-Ganalyzer_output_path=' + args.pop(0)) | 205 args.append('-Ganalyzer_output_path=' + args.pop(0)) |
| 199 | 206 |
| 200 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): | 207 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 312 |
| 306 if not use_analyzer: | 313 if not use_analyzer: |
| 307 vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() | 314 vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() |
| 308 if vs2013_runtime_dll_dirs: | 315 if vs2013_runtime_dll_dirs: |
| 309 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 316 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
| 310 vs_toolchain.CopyVsRuntimeDlls( | 317 vs_toolchain.CopyVsRuntimeDlls( |
| 311 os.path.join(chrome_src, GetOutputDirectory()), | 318 os.path.join(chrome_src, GetOutputDirectory()), |
| 312 (x86_runtime, x64_runtime)) | 319 (x86_runtime, x64_runtime)) |
| 313 | 320 |
| 314 sys.exit(gyp_rc) | 321 sys.exit(gyp_rc) |
| OLD | NEW |