Skip to content

Commit

Permalink
Expose the current Windows SDK value
Browse files Browse the repository at this point in the history
In change https://dawn-review.googlesource.com/c/dawn/+/110340 Dawn
hardcoded the current Windows SDK version used by Chromium so that it
could copy dxc.exe and other files. However this tight coupling makes it
difficult for Chromium to update the SDK version that it builds with.

This change exposes the current SDK version required by Chromium so that
Dawn can use it without complicating Chromium's SDK upgrades.

A follow-up change will get Dawn to actually use this new value, and
then SDK upgrades will be possible again.

Bug: tint:1719
Change-Id: I4beecb7f324b482d1283be2545a7b6f20b05b1d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4234366
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103327}


CrOS-Libchrome-Original-Commit: 8491bdd70be2a703d750c80182270b71d1d0ac97
  • Loading branch information
randomascii authored and chromeos-ci-prod committed Feb 10, 2023
1 parent 5cd7072 commit 5f499c3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions build/vs_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@
#
# * //base/win/windows_version.cc NTDDI preprocessor check
# Triggers a compiler error if the available SDK is older than the minimum.
# * SDK_VERSION in this file - must match the packaged/required SDK version.
# * SDK_VERSION in build/toolchain/win/setup_toolchain.py.
# * //build/config/win/BUILD.gn NTDDI_VERSION value
# Affects the availability of APIs in the toolchain headers.
# * //docs/windows_build_instructions.md mentions of VS or Windows SDK.
# Keeps the document consistent with the toolchain version.
TOOLCHAIN_HASH = '0b5ee4d2b1'
SDK_VERSION = '10.0.20348.0'

script_dir = os.path.dirname(os.path.realpath(__file__))
json_data_file = os.path.join(script_dir, 'win_toolchain.json')
Expand Down Expand Up @@ -455,9 +458,9 @@ def _CopyDebugger(target_dir, target_cpu):
continue
else:
raise Exception('%s not found in "%s"\r\nYou must install '
'Windows 10 SDK version 10.0.20348.0 including the '
'Windows 10 SDK version %s including the '
'"Debugging Tools for Windows" feature.' %
(debug_file, full_path))
(debug_file, full_path, SDK_VERSION))
target_path = os.path.join(target_dir, debug_file)
_CopyRuntimeImpl(target_path, full_path)

Expand Down Expand Up @@ -576,11 +579,13 @@ def GetToolchainDir():
win_sdk_dir = SetEnvironmentAndGetSDKDir()

print('''vs_path = %s
sdk_version = %s
sdk_path = %s
vs_version = %s
wdk_dir = %s
runtime_dirs = %s
''' % (ToGNString(NormalizePath(os.environ['GYP_MSVS_OVERRIDE_PATH'])),
''' % (ToGNString(NormalizePath(
os.environ['GYP_MSVS_OVERRIDE_PATH'])), ToGNString(SDK_VERSION),
ToGNString(win_sdk_dir), ToGNString(GetVisualStudioVersion()),
ToGNString(NormalizePath(os.environ.get('WDK_DIR', ''))),
ToGNString(os.path.pathsep.join(runtime_dll_dirs or ['None']))))
Expand Down

0 comments on commit 5f499c3

Please sign in to comment.