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

Side by Side Diff: build/vs_toolchain.py

Issue 603143002: gn: Fix more build issues on Win (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: += instead of = Created 6 years, 2 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/toolchain/win/BUILD.gn ('k') | gpu/command_buffer/service/BUILD.gn » ('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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import json 5 import json
6 import os 6 import os
7 import pipes 7 import pipes
8 import shutil 8 import shutil
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 ] + _GetDesiredVsToolchainHashes() 157 ] + _GetDesiredVsToolchainHashes()
158 subprocess.check_call(get_toolchain_args) 158 subprocess.check_call(get_toolchain_args)
159 159
160 return 0 160 return 0
161 161
162 162
163 def GetToolchainDir(): 163 def GetToolchainDir():
164 """Gets location information about the current toolchain (must have been 164 """Gets location information about the current toolchain (must have been
165 previously updated by 'update'). This is used for the GN build.""" 165 previously updated by 'update'). This is used for the GN build."""
166 SetEnvironmentAndGetRuntimeDllDirs() 166 SetEnvironmentAndGetRuntimeDllDirs()
167
168 # If WINDOWSSDKDIR is not set, search the default SDK path and set it.
169 if not 'WINDOWSSDKDIR' in os.environ:
170 default_sdk_path = 'C:\\Program Files (x86)\\Windows Kits\\8.0'
171 if os.path.isdir(default_sdk_path):
172 os.environ['WINDOWSSDKDIR'] = default_sdk_path
173
167 print '''vs_path = "%s" 174 print '''vs_path = "%s"
168 sdk_path = "%s" 175 sdk_path = "%s"
169 vs_version = "%s" 176 vs_version = "%s"
170 wdk_dir = "%s" 177 wdk_dir = "%s"
171 ''' % ( 178 ''' % (
172 os.environ['GYP_MSVS_OVERRIDE_PATH'], 179 os.environ['GYP_MSVS_OVERRIDE_PATH'],
173 os.environ['WINDOWSSDKDIR'], 180 os.environ['WINDOWSSDKDIR'],
174 os.environ['GYP_MSVS_VERSION'], 181 os.environ['GYP_MSVS_VERSION'],
175 os.environ.get('WDK_DIR', '')) 182 os.environ.get('WDK_DIR', ''))
176 183
177 184
178 def main(): 185 def main():
179 if not sys.platform.startswith(('win32', 'cygwin')): 186 if not sys.platform.startswith(('win32', 'cygwin')):
180 return 0 187 return 0
181 commands = { 188 commands = {
182 'update': Update, 189 'update': Update,
183 'get_toolchain_dir': GetToolchainDir, 190 'get_toolchain_dir': GetToolchainDir,
184 # TODO(scottmg): Add copy_dlls for GN builds (gyp_chromium calls 191 # TODO(scottmg): Add copy_dlls for GN builds (gyp_chromium calls
185 # CopyVsRuntimeDlls via import, currently). 192 # CopyVsRuntimeDlls via import, currently).
186 } 193 }
187 if len(sys.argv) < 2 or sys.argv[1] not in commands: 194 if len(sys.argv) < 2 or sys.argv[1] not in commands:
188 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) 195 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands)
189 return 1 196 return 1
190 return commands[sys.argv[1]]() 197 return commands[sys.argv[1]]()
191 198
192 199
193 if __name__ == '__main__': 200 if __name__ == '__main__':
194 sys.exit(main()) 201 sys.exit(main())
OLDNEW
« no previous file with comments | « build/toolchain/win/BUILD.gn ('k') | gpu/command_buffer/service/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698