Chromium Code Reviews| 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 543 gn_vars_dict = GetGypVarsForGN(supplemental_includes) | 543 gn_vars_dict = GetGypVarsForGN(supplemental_includes) |
| 544 | 544 |
| 545 # Automatically turn on crosscompile support for platforms that need it. | 545 # Automatically turn on crosscompile support for platforms that need it. |
| 546 # (The Chrome OS build sets CC_host / CC_target which implicitly enables | 546 # (The Chrome OS build sets CC_host / CC_target which implicitly enables |
| 547 # this mode.) | 547 # this mode.) |
| 548 if all(('ninja' in os.environ.get('GYP_GENERATORS', ''), | 548 if all(('ninja' in os.environ.get('GYP_GENERATORS', ''), |
| 549 gn_vars_dict.get('OS') in ['android', 'ios'], | 549 gn_vars_dict.get('OS') in ['android', 'ios'], |
| 550 'GYP_CROSSCOMPILE' not in os.environ)): | 550 'GYP_CROSSCOMPILE' not in os.environ)): |
| 551 os.environ['GYP_CROSSCOMPILE'] = '1' | 551 os.environ['GYP_CROSSCOMPILE'] = '1' |
| 552 | 552 |
| 553 if not RunGN(gn_vars_dict): | 553 if not 'android_webview_build=1' in os.environ.get('GYP_DEFINES', []): |
| 554 sys.exit(1) | 554 if not RunGN(gn_vars_dict): |
| 555 sys.exit(1) | |
| 556 | |
|
Yang Gu
2014/03/13 10:07:29
We don't need to run gn and landmines.py (below) f
Torne
2014/03/13 11:04:46
No, we can't just skip running gn for the webview
Yang Gu
2014/03/13 16:06:07
gn is quite a new thing to me and thanks a lot for
Torne
2014/03/17 15:28:14
No, what I suggested is that you wait until after
| |
| 555 args.extend( | 557 args.extend( |
| 556 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) | 558 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) |
| 557 | 559 |
| 558 args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) | 560 args.extend(['-Dgyp_output_dir=' + GetOutputDirectory()]) |
|
Yang Gu
2014/03/13 10:07:29
This is to unify the format of parameter to be -Dx
| |
| 559 | 561 |
| 560 print 'Updating projects from gyp files...' | 562 print 'Updating projects from gyp files...' |
| 561 sys.stdout.flush() | 563 sys.stdout.flush() |
| 562 | 564 |
| 563 # Off we go... | 565 # Off we go... |
| 564 gyp_rc = gyp.main(args) | 566 gyp_rc = gyp.main(args) |
| 565 | 567 |
| 566 # Check for landmines (reasons to clobber the build). This must be run here, | 568 # Check for landmines (reasons to clobber the build). This must be run here, |
| 567 # rather than a separate runhooks step so that any environment modifications | 569 # rather than a separate runhooks step so that any environment modifications |
| 568 # from above are picked up. | 570 # from above are picked up. |
| 569 print 'Running build/landmines.py...' | 571 if not 'android_webview_build=1' in os.environ.get('GYP_DEFINES', []): |
|
Torne
2014/03/13 11:04:46
Why do you need to disable running landmines? We'v
Yang Gu
2014/03/13 16:06:07
yes, this part doesn't hurt (except speed:)), and
Torne
2014/03/17 15:28:14
I'm not sure what you mean here. If there's no nee
| |
| 570 subprocess.check_call( | 572 print 'Running build/landmines.py...' |
| 571 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | 573 subprocess.check_call( |
| 574 [sys.executable, os.path.join(script_dir, 'landmines.py')]) | |
| 572 | 575 |
| 573 if vs2013_runtime_dll_dirs: | 576 if vs2013_runtime_dll_dirs: |
| 574 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 577 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
| 575 CopyVsRuntimeDlls(os.path.join(chrome_src, GetOutputDirectory()), | 578 CopyVsRuntimeDlls(os.path.join(chrome_src, GetOutputDirectory()), |
| 576 (x86_runtime, x64_runtime)) | 579 (x86_runtime, x64_runtime)) |
| 577 | 580 |
| 578 sys.exit(gyp_rc) | 581 sys.exit(gyp_rc) |
| OLD | NEW |