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

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

Issue 1676263003: Reland of Change default Windows compiler to VS 2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « build/get_landmines.py ('k') | build/vs_toolchain.py » ('j') | 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 raise Exception('"%s" failed with error %d' % (args, popen.returncode)) 143 raise Exception('"%s" failed with error %d' % (args, popen.returncode))
144 env = _ExtractImportantEnvironment(variables) 144 env = _ExtractImportantEnvironment(variables)
145 env['PATH'] = runtime_dirs + ';' + env['PATH'] 145 env['PATH'] = runtime_dirs + ';' + env['PATH']
146 146
147 if cpu == target_cpu: 147 if cpu == target_cpu:
148 for path in env['PATH'].split(os.pathsep): 148 for path in env['PATH'].split(os.pathsep):
149 if os.path.exists(os.path.join(path, 'cl.exe')): 149 if os.path.exists(os.path.join(path, 'cl.exe')):
150 vc_bin_dir = os.path.realpath(path) 150 vc_bin_dir = os.path.realpath(path)
151 break 151 break
152 152
153 # The Windows SDK include directories must be first. They both have a sal.h, 153 # Add extra include directories here that need to be in front of the
154 # and the SDK one is newer and the SDK uses some newer features from it not 154 # installed and packaged include directories. This may be needed in
155 # present in the Visual Studio one. 155 # order to force a particular SDK version, such as to get VS 2013 to use
156 # Having the Windows SDK first is also the only way to control which SDK 156 # the Windows 10 SDK. Beware of making the INCLUDE variable excessively
157 # version is used. 157 # long and be sure to make corresponding changes to build\common.gypi.
158 158 # Not currently used.
159 if win_sdk_path: 159 #if win_sdk_path:
160 additional_includes = ('{sdk_dir}\\Include\\10.0.10586.0\\shared;' + 160 # additional_includes = ('{sdk_dir}\\Include\\10.0.10586.0\\um;').format(
161 '{sdk_dir}\\Include\\10.0.10586.0\\um;' + 161 # sdk_dir=win_sdk_path)
162 '{sdk_dir}\\Include\\10.0.10586.0\\winrt;').format( 162 # env['INCLUDE'] = additional_includes + env['INCLUDE']
163 sdk_dir=win_sdk_path)
164 env['INCLUDE'] = additional_includes + env['INCLUDE']
165 env_block = _FormatAsEnvironmentBlock(env) 163 env_block = _FormatAsEnvironmentBlock(env)
166 with open('environment.' + cpu, 'wb') as f: 164 with open('environment.' + cpu, 'wb') as f:
167 f.write(env_block) 165 f.write(env_block)
168 166
169 # Create a store app version of the environment. 167 # Create a store app version of the environment.
170 if 'LIB' in env: 168 if 'LIB' in env:
171 env['LIB'] = env['LIB'] .replace(r'\VC\LIB', r'\VC\LIB\STORE') 169 env['LIB'] = env['LIB'] .replace(r'\VC\LIB', r'\VC\LIB\STORE')
172 if 'LIBPATH' in env: 170 if 'LIBPATH' in env:
173 env['LIBPATH'] = env['LIBPATH'].replace(r'\VC\LIB', r'\VC\LIB\STORE') 171 env['LIBPATH'] = env['LIBPATH'].replace(r'\VC\LIB', r'\VC\LIB\STORE')
174 env_block = _FormatAsEnvironmentBlock(env) 172 env_block = _FormatAsEnvironmentBlock(env)
175 with open('environment.winrt_' + cpu, 'wb') as f: 173 with open('environment.winrt_' + cpu, 'wb') as f:
176 f.write(env_block) 174 f.write(env_block)
177 175
178 assert vc_bin_dir 176 assert vc_bin_dir
179 print 'vc_bin_dir = "%s"' % vc_bin_dir 177 print 'vc_bin_dir = "%s"' % vc_bin_dir
180 178
181 179
182 if __name__ == '__main__': 180 if __name__ == '__main__':
183 main() 181 main()
OLDNEW
« no previous file with comments | « build/get_landmines.py ('k') | build/vs_toolchain.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698