win: Fix current toolchain path with old packaging

I broke boringssl's use of depot_tools toolchain as I changed the
name of the sdk path key. This happened to work in Chrome because
src/ has fallback behaviour.

Restore the 'win8sdk' name when unpacking a current/old-style
toolchain package (i.e. what everyone is still using).

TBR=dpranke@chromium.org
R=davidben@chromium.org

Review URL: https://codereview.chromium.org/1159433006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295492 0039d316-1c4b-4281-b951-d872f2087c98
changes/01/332501/1
scottmg@chromium.org 10 years ago
parent 44424548cd
commit 17f9065fee

@ -290,26 +290,27 @@ def main():
got_new_toolchain = True
win_sdk = os.path.join(abs_target_dir, 'win_sdk')
try:
with open(os.path.join(target_dir, 'VS_VERSION'), 'rb') as f:
vs_version = f.read().strip()
except IOError:
# Older toolchains didn't have the VS_VERSION file, and used 'win8sdk'
# instead of just 'win_sdk'.
vs_version = '2013'
win_sdk = os.path.join(abs_target_dir, 'win8sdk')
data = {
'path': abs_target_dir,
'version': vs_version,
'win_sdk': win_sdk,
'win_sdk': os.path.join(abs_target_dir, 'win_sdk'),
'wdk': os.path.join(abs_target_dir, 'wdk'),
'runtime_dirs': [
os.path.join(abs_target_dir, 'sys64'),
os.path.join(abs_target_dir, 'sys32'),
],
}
try:
with open(os.path.join(target_dir, 'VS_VERSION'), 'rb') as f:
vs_version = f.read().strip()
except IOError:
# Older toolchains didn't have the VS_VERSION file, and used 'win8sdk'
# instead of just 'win_sdk'.
vs_version = '2013'
data['win8sdk'] = os.path.join(abs_target_dir, 'win8sdk')
data['version'] = vs_version
with open(os.path.join(target_dir, '..', 'data.json'), 'w') as f:
json.dump(data, f)

Loading…
Cancel
Save