Commit 33f80443 authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Fix ucrt redist path for copy_cdb_to_output.py

Recent versions of the 10.0.17763 SDK have rearranged the redist
directory where we find the UCRT DLLs. This change updates the
copy_cdb_to_output.py script so that it looks in the new (versioned)
directory first, and falls back to the old unversioned directory if that
doesn't work.

Without this change we still soon start seeing build failures when
using the locally installed toolchain on clean installs.

See also http://crrev.com/c/1370609 for the depot tools packaging
version of this change, and http://crrev.com/c/1371017 for the
vs_toolchain.py version of this change. Ideally this change would have
been made together with the vs_toolchain.py, but the break was found to
late. The try bots have now done full builds with the new SDK layout so
this should be the last change needed of this type.

Change-Id: I4c965c66296d2f0b6adad672a71c295ffb021c66
Reviewed-on: https://chromium-review.googlesource.com/c/1372222Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615737}
parent 6680f220
......@@ -79,7 +79,14 @@ def _CopyCDBToOutput(output_dir, target_arch):
dst_winext_dir = os.path.join(output_dir, 'winext')
src_winxp_dir = os.path.join(src_dir, 'winxp')
dst_winxp_dir = os.path.join(output_dir, 'winxp')
src_crt_dir = os.path.join(win_sdk_dir, 'Redist', 'ucrt', 'DLLs', src_arch)
# Starting with the 10.0.17763 SDK the ucrt files are in a version-named
# directory - this handles both cases.
redist_dir = os.path.join(win_sdk_dir, 'Redist')
version_dirs = glob.glob(redist_dir + r'\10.*')
if len(version_dirs) > 0:
version_dirs.sort(reverse=True)
redist_dir = version_dirs[0]
src_crt_dir = os.path.join(redist_dir, 'ucrt', 'DLLs', src_arch)
_ConditionalMkdir(dst_winext_dir)
_ConditionalMkdir(dst_winxp_dir)
# Note that the outputs from the "copy_cdb_to_output" target need to
......
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