| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import json | 6 import json |
| 7 import os | 7 import os |
| 8 import pipes | 8 import pipes |
| 9 import shutil | 9 import shutil |
| 10 import subprocess | 10 import subprocess |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 target_dir, runtime_dir, 'msvc%s' + _VersionNumber() + 'd.dll') | 185 target_dir, runtime_dir, 'msvc%s' + _VersionNumber() + 'd.dll') |
| 186 | 186 |
| 187 | 187 |
| 188 def _GetDesiredVsToolchainHashes(): | 188 def _GetDesiredVsToolchainHashes(): |
| 189 """Load a list of SHA1s corresponding to the toolchains that we want installed | 189 """Load a list of SHA1s corresponding to the toolchains that we want installed |
| 190 to build with.""" | 190 to build with.""" |
| 191 if os.environ.get('GYP_MSVS_VERSION') == '2015': | 191 if os.environ.get('GYP_MSVS_VERSION') == '2015': |
| 192 return ['49ae4b60d898182fc3f521c2fcda82c453915011'] | 192 return ['49ae4b60d898182fc3f521c2fcda82c453915011'] |
| 193 else: | 193 else: |
| 194 # Default to VS2013. | 194 # Default to VS2013. |
| 195 return ['9ff97c632ae1fee0c98bcd53e71770eb3a0d8deb'] | 195 return ['ee7d718ec60c2dc5d255bbe325909c2021a7efef'] |
| 196 | 196 |
| 197 | 197 |
| 198 def Update(force=False): | 198 def Update(force=False): |
| 199 """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 |
| 200 this revision. The update outputs a .json of the various configuration | 200 this revision. The update outputs a .json of the various configuration |
| 201 information required to pass to gyp which we use in |GetToolchainDir()|. | 201 information required to pass to gyp which we use in |GetToolchainDir()|. |
| 202 """ | 202 """ |
| 203 if force != False and force != '--force': | 203 if force != False and force != '--force': |
| 204 print >>sys.stderr, 'Unknown parameter "%s"' % force | 204 print >>sys.stderr, 'Unknown parameter "%s"' % force |
| 205 return 1 | 205 return 1 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 'copy_dlls': CopyDlls, | 257 'copy_dlls': CopyDlls, |
| 258 } | 258 } |
| 259 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 259 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
| 260 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 260 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
| 261 return 1 | 261 return 1 |
| 262 return commands[sys.argv[1]](*sys.argv[2:]) | 262 return commands[sys.argv[1]](*sys.argv[2:]) |
| 263 | 263 |
| 264 | 264 |
| 265 if __name__ == '__main__': | 265 if __name__ == '__main__': |
| 266 sys.exit(main()) | 266 sys.exit(main()) |
| OLD | NEW |