OLD | NEW |
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 _CopyRuntime2013( | 179 _CopyRuntime2013( |
180 target_dir, runtime_dir, 'msvc%s' + _VersionNumber() + '.dll') | 180 target_dir, runtime_dir, 'msvc%s' + _VersionNumber() + '.dll') |
181 if configuration == 'Debug': | 181 if configuration == 'Debug': |
182 _CopyRuntime2013( | 182 _CopyRuntime2013( |
183 target_dir, runtime_dir, 'msvc%s' + _VersionNumber() + 'd.dll') | 183 target_dir, runtime_dir, 'msvc%s' + _VersionNumber() + 'd.dll') |
184 | 184 |
185 | 185 |
186 def _GetDesiredVsToolchainHashes(): | 186 def _GetDesiredVsToolchainHashes(): |
187 """Load a list of SHA1s corresponding to the toolchains that we want installed | 187 """Load a list of SHA1s corresponding to the toolchains that we want installed |
188 to build with.""" | 188 to build with.""" |
189 # TODO(scottmg): If explicitly set to VS2015 override hashes to the VS2015 RC | |
190 # toolchain. http://crbug.com/492774. | |
191 if os.environ.get('GYP_MSVS_VERSION') == '2015': | 189 if os.environ.get('GYP_MSVS_VERSION') == '2015': |
192 return ['40721575c85171cea5d7afe5ec17bd108a94796e'] | 190 return ['49ae4b60d898182fc3f521c2fcda82c453915011'] |
193 else: | 191 else: |
194 # Default to VS2013. | 192 # Default to VS2013. |
195 return ['ee7d718ec60c2dc5d255bbe325909c2021a7efef'] | 193 return ['ee7d718ec60c2dc5d255bbe325909c2021a7efef'] |
196 | 194 |
197 | 195 |
198 def Update(): | 196 def Update(): |
199 """Requests an update of the toolchain to the specific hashes we have at | 197 """Requests an update of the toolchain to the specific hashes we have at |
200 this revision. The update outputs a .json of the various configuration | 198 this revision. The update outputs a .json of the various configuration |
201 information required to pass to gyp which we use in |GetToolchainDir()|. | 199 information required to pass to gyp which we use in |GetToolchainDir()|. |
202 """ | 200 """ |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 'copy_dlls': CopyDlls, | 248 'copy_dlls': CopyDlls, |
251 } | 249 } |
252 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 250 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
253 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 251 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
254 return 1 | 252 return 1 |
255 return commands[sys.argv[1]](*sys.argv[2:]) | 253 return commands[sys.argv[1]](*sys.argv[2:]) |
256 | 254 |
257 | 255 |
258 if __name__ == '__main__': | 256 if __name__ == '__main__': |
259 sys.exit(main()) | 257 sys.exit(main()) |
OLD | NEW |