| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 supplemental_includes = GetSupplementalFiles() | 276 supplemental_includes = GetSupplementalFiles() |
| 277 gyp_vars_dict = GetGypVars(supplemental_includes) | 277 gyp_vars_dict = GetGypVars(supplemental_includes) |
| 278 | 278 |
| 279 # Automatically turn on crosscompile support for platforms that need it. | 279 # Automatically turn on crosscompile support for platforms that need it. |
| 280 # (The Chrome OS build sets CC_host / CC_target which implicitly enables | 280 # (The Chrome OS build sets CC_host / CC_target which implicitly enables |
| 281 # this mode.) | 281 # this mode.) |
| 282 if all(('ninja' in os.environ.get('GYP_GENERATORS', ''), | 282 if all(('ninja' in os.environ.get('GYP_GENERATORS', ''), |
| 283 gyp_vars_dict.get('OS') in ['android', 'ios'], | 283 gyp_vars_dict.get('OS') in ['android', 'ios'], |
| 284 'GYP_CROSSCOMPILE' not in os.environ)): | 284 'GYP_CROSSCOMPILE' not in os.environ)): |
| 285 os.environ['GYP_CROSSCOMPILE'] = '1' | 285 os.environ['GYP_CROSSCOMPILE'] = '1' |
| 286 if gyp_vars_dict.get('OS') == 'android': |
| 287 args.append('--check') |
| 286 | 288 |
| 287 args.extend( | 289 args.extend( |
| 288 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) | 290 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) |
| 289 | 291 |
| 290 args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) | 292 args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) |
| 291 | 293 |
| 292 print 'Updating projects from gyp files...' | 294 print 'Updating projects from gyp files...' |
| 293 sys.stdout.flush() | 295 sys.stdout.flush() |
| 294 | 296 |
| 295 # Off we go... | 297 # Off we go... |
| 296 gyp_rc = gyp.main(args) | 298 gyp_rc = gyp.main(args) |
| 297 | 299 |
| 298 # Check for landmines (reasons to clobber the build). This must be run here, | 300 # Check for landmines (reasons to clobber the build). This must be run here, |
| 299 # rather than a separate runhooks step so that any environment modifications | 301 # rather than a separate runhooks step so that any environment modifications |
| 300 # from above are picked up. | 302 # from above are picked up. |
| 301 print 'Running build/landmines.py...' | 303 print 'Running build/landmines.py...' |
| 302 subprocess.check_call( | 304 subprocess.check_call( |
| 303 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 305 [sys.executable, os.path.join(script_dir, 'landmines.py')]) |
| 304 | 306 |
| 305 if vs2013_runtime_dll_dirs: | 307 if vs2013_runtime_dll_dirs: |
| 306 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 308 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
| 307 vs_toolchain.CopyVsRuntimeDlls( | 309 vs_toolchain.CopyVsRuntimeDlls( |
| 308 os.path.join(chrome_src, GetOutputDirectory()), | 310 os.path.join(chrome_src, GetOutputDirectory()), |
| 309 (x86_runtime, x64_runtime)) | 311 (x86_runtime, x64_runtime)) |
| 310 | 312 |
| 311 sys.exit(gyp_rc) | 313 sys.exit(gyp_rc) |
| OLD | NEW |