Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit ad96f00

Browse files
authored
[Windows] Move to Visual Studio 2019 (#643)
Use Visual Studio 2019 to build the engine. This code was modified from Chromium: https://source.chromium.org/chromium/chromium/src/+/main:build/vs_toolchain.py;l=22-48 This is the pull request to update the engine: flutter/engine#37013 This is a requirement to roll ANGLE as it is affected by an STL bug if built using Visual Studio 2017: [angleproject#7693](https://bugs.chromium.org/p/angleproject/issues/detail?id=7693) Part of: flutter/flutter#110948
1 parent 5703870 commit ad96f00

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

build/config/mac/mac_sdk.gni

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ declare_args() {
1212
# Must be of the form x.x.x for Info.plist files.
1313
mac_deployment_target = "10.13.0"
1414

15-
# Path to a specific version of the Mac SDKJ, not including a backslash at
15+
# Path to a specific version of the Mac SDK, not including a backslash at
1616
# the end. If empty, the path to the lowest version greater than or equal to
1717
# mac_sdk_min is used.
1818
mac_sdk_path = ""

build/vs_toolchain.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636

3737
# VS versions are listed in descending order of priority (highest first).
3838
MSVS_VERSIONS = collections.OrderedDict([
39-
('2017', '15.0'),
4039
('2019', '16.0'),
40+
('2017', '15.0'),
4141
('2022', '17.0'),
4242
])
4343

@@ -421,17 +421,13 @@ def _CopyDebugger(target_dir, target_cpu):
421421
def _GetDesiredVsToolchainHashes():
422422
"""Load a list of SHA1s corresponding to the toolchains that we want installed
423423
to build with."""
424-
env_version = GetVisualStudioVersion()
425-
if env_version == '2017':
426-
# VS 2017 Update 9 (15.9.12) with 10.0.18362 SDK, 10.0.17763 version of
427-
# Debuggers, and 10.0.17134 version of d3dcompiler_47.dll, with ARM64
428-
# libraries.
429-
toolchain_hash = '418b3076791776573a815eb298c8aa590307af63'
430-
# Third parties that do not have access to the canonical toolchain can map
431-
# canonical toolchain version to their own toolchain versions.
432-
toolchain_hash_mapping_key = 'GYP_MSVS_HASH_%s' % toolchain_hash
433-
return [os.environ.get(toolchain_hash_mapping_key, toolchain_hash)]
434-
raise Exception('Unsupported VS version %s' % env_version)
424+
# VS 2019 16.61 with 10.0.20348.0 SDK, 10.0.19041 version of Debuggers
425+
# with ARM64 libraries and UWP support.
426+
toolchain_hash = '1023ce2e82'
427+
# Third parties that do not have access to the canonical toolchain can map
428+
# canonical toolchain version to their own toolchain versions.
429+
toolchain_hash_mapping_key = 'GYP_MSVS_HASH_%s' % toolchain_hash
430+
return [os.environ.get(toolchain_hash_mapping_key, toolchain_hash)]
435431

436432

437433
def ShouldUpdateToolchain():

0 commit comments

Comments
 (0)