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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 # . -f / --format has precedence over the env var, no need to check for it | 258 # . -f / --format has precedence over the env var, no need to check for it |
259 # . set the env var only if it hasn't been set yet | 259 # . set the env var only if it hasn't been set yet |
260 # . chromium.gyp_env has been applied to os.environ at this point already | 260 # . chromium.gyp_env has been applied to os.environ at this point already |
261 if sys.platform.startswith(('linux', 'win', 'freebsd')) and \ | 261 if sys.platform.startswith(('linux', 'win', 'freebsd')) and \ |
262 not os.environ.get('GYP_GENERATORS'): | 262 not os.environ.get('GYP_GENERATORS'): |
263 os.environ['GYP_GENERATORS'] = 'ninja' | 263 os.environ['GYP_GENERATORS'] = 'ninja' |
264 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ | 264 elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ |
265 not 'OS=ios' in os.environ.get('GYP_DEFINES', []): | 265 not 'OS=ios' in os.environ.get('GYP_DEFINES', []): |
266 os.environ['GYP_GENERATORS'] = 'ninja' | 266 os.environ['GYP_GENERATORS'] = 'ninja' |
267 | 267 |
268 vs2013_runtime_dll_dirs = vs_toolchain.DownloadVsToolchain() | 268 vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() |
269 | 269 |
270 # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check | 270 # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check |
271 # to enfore syntax checking. | 271 # to enfore syntax checking. |
272 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 272 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
273 if syntax_check and int(syntax_check): | 273 if syntax_check and int(syntax_check): |
274 args.append('--check') | 274 args.append('--check') |
275 | 275 |
276 supplemental_includes = GetSupplementalFiles() | 276 supplemental_includes = GetSupplementalFiles() |
277 gyp_vars_dict = GetGypVars(supplemental_includes) | 277 gyp_vars_dict = GetGypVars(supplemental_includes) |
278 | 278 |
(...skipping 25 matching lines...) Expand all Loading... |
304 subprocess.check_call( | 304 subprocess.check_call( |
305 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 305 [sys.executable, os.path.join(script_dir, 'landmines.py')]) |
306 | 306 |
307 if vs2013_runtime_dll_dirs: | 307 if vs2013_runtime_dll_dirs: |
308 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 308 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
309 vs_toolchain.CopyVsRuntimeDlls( | 309 vs_toolchain.CopyVsRuntimeDlls( |
310 os.path.join(chrome_src, GetOutputDirectory()), | 310 os.path.join(chrome_src, GetOutputDirectory()), |
311 (x86_runtime, x64_runtime)) | 311 (x86_runtime, x64_runtime)) |
312 | 312 |
313 sys.exit(gyp_rc) | 313 sys.exit(gyp_rc) |
OLD | NEW |