Commit fead74a8 authored by brucedawson's avatar brucedawson Committed by Commit bot

Don't confuse VS 2013 with VS 2017

Building with VS 2017 using a packaged toolchain is not yet supported
but if you try to do it you get a surprising result - the VS 2013
toolchain gets downloaded. This adds a 2013 check to avoid this, and
also simplifies/corrects an existing 2017 check and comment.

This lets us fail-fast if a user tries the VS 2017 depot-tools
combination before it is supported.

BUG=683729

Review-Url: https://codereview.chromium.org/2741783006
Cr-Commit-Position: refs/heads/master@{#456226}
parent a26877df
...@@ -238,8 +238,8 @@ def _CopyRuntime(target_dir, source_dir, target_cpu, debug): ...@@ -238,8 +238,8 @@ def _CopyRuntime(target_dir, source_dir, target_cpu, debug):
"""Copy the VS runtime DLLs, only if the target doesn't exist, but the target """Copy the VS runtime DLLs, only if the target doesn't exist, but the target
directory does exist. Handles VS 2013, VS 2015, and VS 2017.""" directory does exist. Handles VS 2013, VS 2015, and VS 2017."""
suffix = "d.dll" if debug else ".dll" suffix = "d.dll" if debug else ".dll"
if GetVisualStudioVersion() == '2015' or GetVisualStudioVersion() == '2017': if GetVisualStudioVersion() in ['2015', '2017']:
# VS 2017 RC uses the same CRT DLLs as VS 2015. # VS 2017 uses the same CRT DLLs as VS 2015.
_CopyUCRTRuntime(target_dir, source_dir, '%s140' + suffix, suffix) _CopyUCRTRuntime(target_dir, source_dir, '%s140' + suffix, suffix)
else: else:
_CopyRuntime2013(target_dir, source_dir, 'msvc%s120' + suffix) _CopyRuntime2013(target_dir, source_dir, 'msvc%s120' + suffix)
...@@ -343,8 +343,10 @@ def _GetDesiredVsToolchainHashes(): ...@@ -343,8 +343,10 @@ def _GetDesiredVsToolchainHashes():
if GetVisualStudioVersion() == '2015': if GetVisualStudioVersion() == '2015':
# Update 3 final with patches with 10.0.14393.0 SDK. # Update 3 final with patches with 10.0.14393.0 SDK.
return ['d3cb0e37bdd120ad0ac4650b674b09e81be45616'] return ['d3cb0e37bdd120ad0ac4650b674b09e81be45616']
else: elif GetVisualStudioVersion() == '2013':
return ['03a4e939cd325d6bc5216af41b92d02dda1366a6'] return ['03a4e939cd325d6bc5216af41b92d02dda1366a6']
else:
raise Exception('Unsupported VS version %s' % GetVisualStudioVersion())
def ShouldUpdateToolchain(): def ShouldUpdateToolchain():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment