Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: build/gyp_chromium

Issue 126073005: GN: Autodetect Visual Studio versions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 ] 151 ]
152 for i in remap_cases: 152 for i in remap_cases:
153 if i[0] in vars_dict and vars_dict[i[0]] == i[1]: 153 if i[0] in vars_dict and vars_dict[i[0]] == i[1]:
154 gn_args += ' ' + i[2] 154 gn_args += ' ' + i[2]
155 155
156 # These string arguments get passed directly. 156 # These string arguments get passed directly.
157 for v in ['windows_sdk_path']: 157 for v in ['windows_sdk_path']:
158 if v in vars_dict: 158 if v in vars_dict:
159 gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v]) 159 gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v])
160 160
161 # Some other flags come from GYP environment variables.
162 gyp_msvs_version = os.environ.get('GYP_MSVS_VERSION', '')
163 if gyp_msvs_version:
164 gn_args += ' visual_studio_version=' + EscapeStringForGN(gyp_msvs_version)
165 gyp_msvs_override_path = os.environ.get('GYP_MSVS_OVERRIDE_PATH', '')
166 if gyp_msvs_override_path:
167 gn_args += ' visual_studio_override_path=' + \
168 EscapeStringForGN(gyp_msvs_override_path)
169
161 # Set the GYP flag so BUILD files know they're being invoked in GYP mode. 170 # Set the GYP flag so BUILD files know they're being invoked in GYP mode.
162 gn_args += ' is_gyp=true' 171 gn_args += ' is_gyp=true'
163 return gn_args.strip() 172 return gn_args.strip()
164 173
165 174
166 def additional_include_files(supplemental_files, args=[]): 175 def additional_include_files(supplemental_files, args=[]):
167 """ 176 """
168 Returns a list of additional (.gypi) files to include, without duplicating 177 Returns a list of additional (.gypi) files to include, without duplicating
169 ones that are already specified on the command line. The list of supplemental 178 ones that are already specified on the command line. The list of supplemental
170 include files is passed in as an argument. 179 include files is passed in as an argument.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 # to enfore syntax checking. 348 # to enfore syntax checking.
340 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') 349 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK')
341 if syntax_check and int(syntax_check): 350 if syntax_check and int(syntax_check):
342 args.append('--check') 351 args.append('--check')
343 352
344 print 'Updating projects from gyp files...' 353 print 'Updating projects from gyp files...'
345 sys.stdout.flush() 354 sys.stdout.flush()
346 355
347 # Off we go... 356 # Off we go...
348 sys.exit(gyp.main(args)) 357 sys.exit(gyp.main(args))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698