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

Side by Side Diff: build/toolchain/win/setup_toolchain.py

Issue 2814843003: Specify the SDK version when running vcvarsall.bat (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 # 4 #
5 # Copies the given "win tool" (which the toolchain uses to wrap compiler 5 # Copies the given "win tool" (which the toolchain uses to wrap compiler
6 # invocations) and the environment blocks for the 32-bit and 64-bit builds on 6 # invocations) and the environment blocks for the 32-bit and 64-bit builds on
7 # Windows to the build directory. 7 # Windows to the build directory.
8 # 8 #
9 # The arguments are the visual studio install location and the location of the 9 # The arguments are the visual studio install location and the location of the
10 # win tool. The script assumes that the root build directory is the current dir 10 # win tool. The script assumes that the root build directory is the current dir
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 # variable. 132 # variable.
133 if 'VSINSTALLDIR' in os.environ: 133 if 'VSINSTALLDIR' in os.environ:
134 del os.environ['VSINSTALLDIR'] 134 del os.environ['VSINSTALLDIR']
135 other_path = os.path.normpath(os.path.join( 135 other_path = os.path.normpath(os.path.join(
136 os.environ['GYP_MSVS_OVERRIDE_PATH'], 136 os.environ['GYP_MSVS_OVERRIDE_PATH'],
137 'VC/Auxiliary/Build/vcvarsall.bat')) 137 'VC/Auxiliary/Build/vcvarsall.bat'))
138 if not os.path.exists(other_path): 138 if not os.path.exists(other_path):
139 raise Exception('%s is missing - make sure VC++ tools are installed.' % 139 raise Exception('%s is missing - make sure VC++ tools are installed.' %
140 script_path) 140 script_path)
141 script_path = other_path 141 script_path = other_path
142 args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64'] 142 # Chromium requires the 10.0.14393.0 SDK. Previous versions don't have all
143 # of the required declarations, and 10.0.15063.0 is buggy.
144 args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64',
145 '10.0.14393.0']
143 variables = _LoadEnvFromBat(args) 146 variables = _LoadEnvFromBat(args)
scottmg 2017/04/11 21:23:19 I don't think this works on VS2015, there was no S
brucedawson 2017/04/11 21:40:59 I tested it on VS 2015. It works fine. It also wor
144 return _ExtractImportantEnvironment(variables) 147 return _ExtractImportantEnvironment(variables)
145 148
146 149
147 def _FormatAsEnvironmentBlock(envvar_dict): 150 def _FormatAsEnvironmentBlock(envvar_dict):
148 """Format as an 'environment block' directly suitable for CreateProcess. 151 """Format as an 'environment block' directly suitable for CreateProcess.
149 Briefly this is a list of key=value\0, terminated by an additional \0. See 152 Briefly this is a list of key=value\0, terminated by an additional \0. See
150 CreateProcess documentation for more details.""" 153 CreateProcess documentation for more details."""
151 block = '' 154 block = ''
152 nul = '\0' 155 nul = '\0'
153 for key, value in envvar_dict.iteritems(): 156 for key, value in envvar_dict.iteritems():
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 208
206 assert vc_bin_dir 209 assert vc_bin_dir
207 print 'vc_bin_dir = ' + gn_helpers.ToGNString(vc_bin_dir) 210 print 'vc_bin_dir = ' + gn_helpers.ToGNString(vc_bin_dir)
208 assert include_I 211 assert include_I
209 print 'include_flags_I = ' + gn_helpers.ToGNString(include_I) 212 print 'include_flags_I = ' + gn_helpers.ToGNString(include_I)
210 assert include_imsvc 213 assert include_imsvc
211 print 'include_flags_imsvc = ' + gn_helpers.ToGNString(include_imsvc) 214 print 'include_flags_imsvc = ' + gn_helpers.ToGNString(include_imsvc)
212 215
213 if __name__ == '__main__': 216 if __name__ == '__main__':
214 main() 217 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698