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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 ] | 170 ] |
| 171 for i in remap_cases: | 171 for i in remap_cases: |
| 172 if i[0] in vars_dict and vars_dict[i[0]] == i[1]: | 172 if i[0] in vars_dict and vars_dict[i[0]] == i[1]: |
| 173 gn_args += ' ' + i[2] | 173 gn_args += ' ' + i[2] |
| 174 | 174 |
| 175 # These string arguments get passed directly. | 175 # These string arguments get passed directly. |
| 176 for v in ['windows_sdk_path']: | 176 for v in ['windows_sdk_path']: |
| 177 if v in vars_dict: | 177 if v in vars_dict: |
| 178 gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v]) | 178 gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v]) |
| 179 | 179 |
| 180 # Some other flags come from GYP environment variables. | |
| 181 gyp_msvs_version = os.environ.get('GYP_MSVS_VERSION', '') | |
| 182 if gyp_msvs_version: | |
| 183 gn_args += ' visual_studio_version=' + EscapeStringForGN(gyp_msvs_version) | |
| 184 gyp_msvs_override_path = os.environ.get('GYP_MSVS_OVERRIDE_PATH', '') | |
| 185 if gyp_msvs_override_path: | |
| 186 gn_args += ' visual_studio_override_path=' + \ | |
|
ncarter (slow)
2014/01/09 00:57:18
I think this just needs to be visual_studio_path (
| |
| 187 EscapeStringForGN(gyp_msvs_override_path) | |
| 188 | |
| 180 # Set the GYP flag so BUILD files know they're being invoked in GYP mode. | 189 # Set the GYP flag so BUILD files know they're being invoked in GYP mode. |
| 181 gn_args += ' is_gyp=true' | 190 gn_args += ' is_gyp=true' |
| 182 return gn_args.strip() | 191 return gn_args.strip() |
| 183 | 192 |
| 184 | 193 |
| 185 def additional_include_files(supplemental_files, args=[]): | 194 def additional_include_files(supplemental_files, args=[]): |
| 186 """ | 195 """ |
| 187 Returns a list of additional (.gypi) files to include, without duplicating | 196 Returns a list of additional (.gypi) files to include, without duplicating |
| 188 ones that are already specified on the command line. The list of supplemental | 197 ones that are already specified on the command line. The list of supplemental |
| 189 include files is passed in as an argument. | 198 include files is passed in as an argument. |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 # to enfore syntax checking. | 367 # to enfore syntax checking. |
| 359 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 368 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
| 360 if syntax_check and int(syntax_check): | 369 if syntax_check and int(syntax_check): |
| 361 args.append('--check') | 370 args.append('--check') |
| 362 | 371 |
| 363 print 'Updating projects from gyp files...' | 372 print 'Updating projects from gyp files...' |
| 364 sys.stdout.flush() | 373 sys.stdout.flush() |
| 365 | 374 |
| 366 # Off we go... | 375 # Off we go... |
| 367 sys.exit(gyp.main(args)) | 376 sys.exit(gyp.main(args)) |
| OLD | NEW |