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. |
189 if os.environ.get('GYP_MSVS_VERSION') == '2015': | 191 if os.environ.get('GYP_MSVS_VERSION') == '2015': |
190 return ['49ae4b60d898182fc3f521c2fcda82c453915011'] | 192 return ['40721575c85171cea5d7afe5ec17bd108a94796e'] |
191 else: | 193 else: |
192 # Default to VS2013. | 194 # Default to VS2013. |
193 return ['ee7d718ec60c2dc5d255bbe325909c2021a7efef'] | 195 return ['ee7d718ec60c2dc5d255bbe325909c2021a7efef'] |
194 | 196 |
195 | 197 |
196 def Update(): | 198 def Update(): |
197 """Requests an update of the toolchain to the specific hashes we have at | 199 """Requests an update of the toolchain to the specific hashes we have at |
198 this revision. The update outputs a .json of the various configuration | 200 this revision. The update outputs a .json of the various configuration |
199 information required to pass to gyp which we use in |GetToolchainDir()|. | 201 information required to pass to gyp which we use in |GetToolchainDir()|. |
200 """ | 202 """ |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 'copy_dlls': CopyDlls, | 250 'copy_dlls': CopyDlls, |
249 } | 251 } |
250 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 252 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
251 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 253 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
252 return 1 | 254 return 1 |
253 return commands[sys.argv[1]](*sys.argv[2:]) | 255 return commands[sys.argv[1]](*sys.argv[2:]) |
254 | 256 |
255 | 257 |
256 if __name__ == '__main__': | 258 if __name__ == '__main__': |
257 sys.exit(main()) | 259 sys.exit(main()) |
OLD | NEW |