Commit fed2cb39 authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Fix ucrt source path when packaging the Windows toolchain

Recent versions of the 10.0.17763 SDK have rearranged the redist
directory. This change adjusts the packaging so that we can package the
SDK with and without this change. The script looks first in the
versioned directory and if that doesn't exist then it falls back to the
unversioned directory.

See also http://crrev.com/c/1371017 for the build\vs_toolchain.py
version of this change.

Change-Id: I835bf45f613a0aebb56eb1e8e63e6ffa5252edf0
Reviewed-on: https://chromium-review.googlesource.com/c/1370609Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
parent 762a2569
......@@ -207,8 +207,13 @@ def BuildFileList(override_dir):
result.append((combined, to))
# Copy the x86 ucrt DLLs to all directories with x86 binaries that are
# added to the path by SetEnv.cmd, and to sys32.
ucrt_paths = glob.glob(os.path.join(sdk_path, r'redist\ucrt\dlls\x86\*'))
# added to the path by SetEnv.cmd, and to sys32. Starting with the 17763
# SDK the ucrt files are in WIN_VERSION\ucrt instead of just ucrt.
ucrt_dir = os.path.join(sdk_path, 'redist', WIN_VERSION, r'ucrt\dlls\x86')
if not os.path.exists(ucrt_dir):
ucrt_dir = os.path.join(sdk_path, r'redist\ucrt\dlls\x86')
ucrt_paths = glob.glob(ucrt_dir + r'\*')
assert(len(ucrt_paths) > 0)
for ucrt_path in ucrt_paths:
ucrt_file = os.path.split(ucrt_path)[1]
for dest_dir in [ r'win_sdk\bin\x86', 'sys32' ]:
......@@ -216,7 +221,11 @@ def BuildFileList(override_dir):
# Copy the x64 ucrt DLLs to all directories with x64 binaries that are
# added to the path by SetEnv.cmd, and to sys64.
ucrt_paths = glob.glob(os.path.join(sdk_path, r'redist\ucrt\dlls\x64\*'))
ucrt_dir = os.path.join(sdk_path, 'redist', WIN_VERSION, r'ucrt\dlls\x64')
if not os.path.exists(ucrt_dir):
ucrt_dir = os.path.join(sdk_path, r'redist\ucrt\dlls\x64')
ucrt_paths = glob.glob(ucrt_dir + r'\*')
assert(len(ucrt_paths) > 0)
for ucrt_path in ucrt_paths:
ucrt_file = os.path.split(ucrt_path)[1]
for dest_dir in [ r'VC\bin\amd64_x86', r'VC\bin\amd64',
......
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