Commit 85af4533 authored by Robert Iannucci's avatar Robert Iannucci Committed by Commit Bot

[windows_sdk] Default to cache/windows_sdk.

This should allow better integration with buildbucket named cache
support. Since this was already parameterized it shouldn't actually
break anything; previously the directory would be deleted on every run,
now it will still be deleted on every run (but we can add a buildbucket
named cache entry for it to preserve it).

R=tandrii@chromium.org, vadimsh@chromium.org

Bug: 877775
Change-Id: I1184fb59a3ed18bfda5fcb288903201b01527096
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Reviewed-on: https://chromium-review.googlesource.com/c/1263861
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: 's avatarVadim Shtayura <vadimsh@chromium.org>
parent 0c3bd490
......@@ -869,7 +869,7 @@ Setups the SDK environment when enabled.
Args:
path (path): Path to a directory where to install the SDK
(default is '[start_dir]/windows_sdk')
(default is '[CACHE]/windows_sdk')
version (str): CIPD version of the SDK
(default is set via $infra/windows_sdk.version property)
enabled (bool): Whether the SDK should be used or not.
......
......@@ -26,7 +26,7 @@ class WindowsSDKApi(recipe_api.RecipeApi):
Args:
path (path): Path to a directory where to install the SDK
(default is '[start_dir]/windows_sdk')
(default is '[CACHE]/windows_sdk')
version (str): CIPD version of the SDK
(default is set via $infra/windows_sdk.version property)
enabled (bool): Whether the SDK should be used or not.
......@@ -36,7 +36,7 @@ class WindowsSDKApi(recipe_api.RecipeApi):
"""
if enabled:
sdk_dir = self._ensure_sdk(
path or self.m.path['start_dir'].join('windows_sdk'),
path or self.m.path['cache'].join('windows_sdk'),
version or self._sdk_properties['version'])
try:
with self.m.context(**self._sdk_env(sdk_dir)):
......
......@@ -4,7 +4,7 @@
"cipd.bat",
"ensure",
"-root",
"[START_DIR]\\windows_sdk",
"[CACHE]\\windows_sdk",
"-ensure-file",
"chrome_internal/third_party/sdk/windows uploaded:2018-06-13",
"-json-output",
......@@ -31,7 +31,7 @@
"python",
"-u",
"\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
"[START_DIR]\\windows_sdk\\win_sdk\\bin\\SetEnv.x64.json",
"[CACHE]\\windows_sdk\\win_sdk\\bin\\SetEnv.x64.json",
"/path/to/tmp/json"
],
"name": "read SetEnv.x64.json",
......@@ -65,11 +65,11 @@
"out/Release"
],
"env": {
"VSINSTALLDIR": "[START_DIR]\\windows_sdk"
"VSINSTALLDIR": "[CACHE]\\windows_sdk"
},
"env_prefixes": {
"PATH": [
"[START_DIR]\\windows_sdk\\win_sdk\\bin\\x64"
"[CACHE]\\windows_sdk\\win_sdk\\bin\\x64"
]
},
"name": "gn"
......@@ -81,11 +81,11 @@
"out/Release"
],
"env": {
"VSINSTALLDIR": "[START_DIR]\\windows_sdk"
"VSINSTALLDIR": "[CACHE]\\windows_sdk"
},
"env_prefixes": {
"PATH": [
"[START_DIR]\\windows_sdk\\win_sdk\\bin\\x64"
"[CACHE]\\windows_sdk\\win_sdk\\bin\\x64"
]
},
"name": "ninja"
......
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