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 glob | 6 import glob |
7 import json | 7 import json |
8 import os | 8 import os |
9 import pipes | 9 import pipes |
10 import platform | 10 import platform |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 runtime_dir = x64_runtime if target_cpu == 'x64' else x86_runtime | 298 runtime_dir = x64_runtime if target_cpu == 'x64' else x86_runtime |
299 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False) | 299 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False) |
300 if configuration == 'Debug': | 300 if configuration == 'Debug': |
301 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True) | 301 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True) |
302 | 302 |
303 | 303 |
304 def _GetDesiredVsToolchainHashes(): | 304 def _GetDesiredVsToolchainHashes(): |
305 """Load a list of SHA1s corresponding to the toolchains that we want installed | 305 """Load a list of SHA1s corresponding to the toolchains that we want installed |
306 to build with.""" | 306 to build with.""" |
307 if GetVisualStudioVersion() == '2015': | 307 if GetVisualStudioVersion() == '2015': |
308 if bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN_PRERELEASE', '0'))): | 308 # Update 3 final with patches with 10.0.10586.0 SDK. |
309 # Update 3 final with patches. | 309 return ['d5dc33b15d1b2c086f2f6632e2fd15882f80dbd3'] |
310 return ['d5dc33b15d1b2c086f2f6632e2fd15882f80dbd3'] | |
311 else: | |
312 # Update 2. | |
313 return ['95ddda401ec5678f15eeed01d2bee08fcbc5ee97'] | |
314 else: | 310 else: |
315 return ['03a4e939cd325d6bc5216af41b92d02dda1366a6'] | 311 return ['03a4e939cd325d6bc5216af41b92d02dda1366a6'] |
316 | 312 |
317 | 313 |
318 def ShouldUpdateToolchain(): | 314 def ShouldUpdateToolchain(): |
319 """Check if the toolchain should be upgraded.""" | 315 """Check if the toolchain should be upgraded.""" |
320 if not os.path.exists(json_data_file): | 316 if not os.path.exists(json_data_file): |
321 return True | 317 return True |
322 with open(json_data_file, 'r') as tempf: | 318 with open(json_data_file, 'r') as tempf: |
323 toolchain_data = json.load(tempf) | 319 toolchain_data = json.load(tempf) |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 'copy_dlls': CopyDlls, | 395 'copy_dlls': CopyDlls, |
400 } | 396 } |
401 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 397 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
402 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 398 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
403 return 1 | 399 return 1 |
404 return commands[sys.argv[1]](*sys.argv[2:]) | 400 return commands[sys.argv[1]](*sys.argv[2:]) |
405 | 401 |
406 | 402 |
407 if __name__ == '__main__': | 403 if __name__ == '__main__': |
408 sys.exit(main()) | 404 sys.exit(main()) |
OLD | NEW |