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

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

Issue 1783773004: 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, 9 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 # Extract environment variables for subprocesses. 149 # Extract environment variables for subprocesses.
150 env = _LoadToolchainEnv(cpu, win_sdk_path) 150 env = _LoadToolchainEnv(cpu, win_sdk_path)
151 env['PATH'] = runtime_dirs + os.path.pathsep + env['PATH'] 151 env['PATH'] = runtime_dirs + os.path.pathsep + env['PATH']
152 152
153 if cpu == target_cpu: 153 if cpu == target_cpu:
154 for path in env['PATH'].split(os.pathsep): 154 for path in env['PATH'].split(os.pathsep):
155 if os.path.exists(os.path.join(path, 'cl.exe')): 155 if os.path.exists(os.path.join(path, 'cl.exe')):
156 vc_bin_dir = os.path.realpath(path) 156 vc_bin_dir = os.path.realpath(path)
157 break 157 break
158 158
159 # The Windows SDK include directories must be first. They both have a sal.h, 159 # Add extra include directories here that need to be in front of the
160 # and the SDK one is newer and the SDK uses some newer features from it not 160 # installed and packaged include directories. This may be needed in
161 # present in the Visual Studio one. 161 # order to force a particular SDK version, such as to get VS 2013 to use
162 # Having the Windows SDK first is also the only way to control which SDK 162 # the Windows 10 SDK. Beware of making the INCLUDE variable excessively
163 # version is used. 163 # long and be sure to make corresponding changes to build\common.gypi.
164 164 # Not currently used.
165 if win_sdk_path: 165 #if win_sdk_path:
166 additional_includes = [ 166 # additional_includes = [
167 os.path.join(win_sdk_path, 'Include', '10.0.10586.0', p) 167 # os.path.join(win_sdk_path, 'Include', '10.0.10586.0', p)
168 for p in ['shared', 'um', 'winrt']] 168 # for p in ['shared', 'um', 'winrt']]
169 additional_includes = os.path.pathsep.join(additional_includes) 169 # additional_includes = os.path.pathsep.join(additional_includes)
170 env['INCLUDE'] = additional_includes + os.path.pathsep + env['INCLUDE'] 170 # env['INCLUDE'] = additional_includes + os.path.pathsep + env['INCLUDE']
Nico 2016/03/20 23:54:21 Was this change intentional? We don't check in com
Nico 2016/03/21 17:35:50 I'm deleting it here: https://codereview.chromium.
171 env_block = _FormatAsEnvironmentBlock(env) 171 env_block = _FormatAsEnvironmentBlock(env)
172 with open('environment.' + cpu, 'wb') as f: 172 with open('environment.' + cpu, 'wb') as f:
173 f.write(env_block) 173 f.write(env_block)
174 174
175 # Create a store app version of the environment. 175 # Create a store app version of the environment.
176 if 'LIB' in env: 176 if 'LIB' in env:
177 env['LIB'] = env['LIB'] .replace(r'\VC\LIB', r'\VC\LIB\STORE') 177 env['LIB'] = env['LIB'] .replace(r'\VC\LIB', r'\VC\LIB\STORE')
178 if 'LIBPATH' in env: 178 if 'LIBPATH' in env:
179 env['LIBPATH'] = env['LIBPATH'].replace(r'\VC\LIB', r'\VC\LIB\STORE') 179 env['LIBPATH'] = env['LIBPATH'].replace(r'\VC\LIB', r'\VC\LIB\STORE')
180 env_block = _FormatAsEnvironmentBlock(env) 180 env_block = _FormatAsEnvironmentBlock(env)
181 with open('environment.winrt_' + cpu, 'wb') as f: 181 with open('environment.winrt_' + cpu, 'wb') as f:
182 f.write(env_block) 182 f.write(env_block)
183 183
184 assert vc_bin_dir 184 assert vc_bin_dir
185 print 'vc_bin_dir = "%s"' % vc_bin_dir 185 print 'vc_bin_dir = "%s"' % vc_bin_dir
186 186
187 187
188 if __name__ == '__main__': 188 if __name__ == '__main__':
189 main() 189 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