OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 the V8 project authors. All rights reserved. | 2 # Copyright 2015 the V8 project authors. All rights reserved. |
3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import glob | 7 import glob |
8 import json | 8 import json |
9 import os | 9 import os |
10 import pipes | 10 import pipes |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True) | 276 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True) |
277 | 277 |
278 | 278 |
279 def _GetDesiredVsToolchainHashes(): | 279 def _GetDesiredVsToolchainHashes(): |
280 """Load a list of SHA1s corresponding to the toolchains that we want installed | 280 """Load a list of SHA1s corresponding to the toolchains that we want installed |
281 to build with.""" | 281 to build with.""" |
282 if GetVisualStudioVersion() == '2015': | 282 if GetVisualStudioVersion() == '2015': |
283 # Update 2. | 283 # Update 2. |
284 return ['95ddda401ec5678f15eeed01d2bee08fcbc5ee97'] | 284 return ['95ddda401ec5678f15eeed01d2bee08fcbc5ee97'] |
285 else: | 285 else: |
286 return ['4087e065abebdca6dbd0caca2910c6718d2ec67f'] | 286 return ['03a4e939cd325d6bc5216af41b92d02dda1366a6'] |
287 | 287 |
288 | 288 |
289 def ShouldUpdateToolchain(): | 289 def ShouldUpdateToolchain(): |
290 """Check if the toolchain should be upgraded.""" | 290 """Check if the toolchain should be upgraded.""" |
291 if not os.path.exists(json_data_file): | 291 if not os.path.exists(json_data_file): |
292 return True | 292 return True |
293 with open(json_data_file, 'r') as tempf: | 293 with open(json_data_file, 'r') as tempf: |
294 toolchain_data = json.load(tempf) | 294 toolchain_data = json.load(tempf) |
295 version = toolchain_data['version'] | 295 version = toolchain_data['version'] |
296 env_version = GetVisualStudioVersion() | 296 env_version = GetVisualStudioVersion() |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 'copy_dlls': CopyDlls, | 370 'copy_dlls': CopyDlls, |
371 } | 371 } |
372 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 372 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
373 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 373 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
374 return 1 | 374 return 1 |
375 return commands[sys.argv[1]](*sys.argv[2:]) | 375 return commands[sys.argv[1]](*sys.argv[2:]) |
376 | 376 |
377 | 377 |
378 if __name__ == '__main__': | 378 if __name__ == '__main__': |
379 sys.exit(main()) | 379 sys.exit(main()) |
OLD | NEW |