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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check | 271 # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check |
272 # to enfore syntax checking. | 272 # to enfore syntax checking. |
273 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 273 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
274 if syntax_check and int(syntax_check): | 274 if syntax_check and int(syntax_check): |
275 args.append('--check') | 275 args.append('--check') |
276 | 276 |
277 supplemental_includes = GetSupplementalFiles() | 277 supplemental_includes = GetSupplementalFiles() |
278 gyp_vars_dict = GetGypVars(supplemental_includes) | 278 gyp_vars_dict = GetGypVars(supplemental_includes) |
279 | 279 |
| 280 # TODO(dmikurube): Remove these checks and messages after a while. |
| 281 if ('linux_use_tcmalloc' in gyp_vars_dict or |
| 282 'android_use_tcmalloc' in gyp_vars_dict): |
| 283 print '*****************************************************************' |
| 284 print '"linux_use_tcmalloc" and "android_use_tcmalloc" are deprecated!' |
| 285 print '-----------------------------------------------------------------' |
| 286 print 'You specify "linux_use_tcmalloc" or "android_use_tcmalloc" in' |
| 287 print 'your GYP_DEFINES. Please switch them into "use_allocator" now.' |
| 288 print 'See http://crbug.com/345554 for the details.' |
| 289 print '*****************************************************************' |
| 290 |
280 # Automatically turn on crosscompile support for platforms that need it. | 291 # Automatically turn on crosscompile support for platforms that need it. |
281 # (The Chrome OS build sets CC_host / CC_target which implicitly enables | 292 # (The Chrome OS build sets CC_host / CC_target which implicitly enables |
282 # this mode.) | 293 # this mode.) |
283 if all(('ninja' in os.environ.get('GYP_GENERATORS', ''), | 294 if all(('ninja' in os.environ.get('GYP_GENERATORS', ''), |
284 gyp_vars_dict.get('OS') in ['android', 'ios'], | 295 gyp_vars_dict.get('OS') in ['android', 'ios'], |
285 'GYP_CROSSCOMPILE' not in os.environ)): | 296 'GYP_CROSSCOMPILE' not in os.environ)): |
286 os.environ['GYP_CROSSCOMPILE'] = '1' | 297 os.environ['GYP_CROSSCOMPILE'] = '1' |
287 if gyp_vars_dict.get('OS') == 'android': | 298 if gyp_vars_dict.get('OS') == 'android': |
288 args.append('--check') | 299 args.append('--check') |
289 | 300 |
(...skipping 15 matching lines...) Expand all Loading... |
305 subprocess.check_call( | 316 subprocess.check_call( |
306 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 317 [sys.executable, os.path.join(script_dir, 'landmines.py')]) |
307 | 318 |
308 if vs2013_runtime_dll_dirs: | 319 if vs2013_runtime_dll_dirs: |
309 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 320 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
310 vs_toolchain.CopyVsRuntimeDlls( | 321 vs_toolchain.CopyVsRuntimeDlls( |
311 os.path.join(chrome_src, GetOutputDirectory()), | 322 os.path.join(chrome_src, GetOutputDirectory()), |
312 (x86_runtime, x64_runtime)) | 323 (x86_runtime, x64_runtime)) |
313 | 324 |
314 sys.exit(gyp_rc) | 325 sys.exit(gyp_rc) |
OLD | NEW |