-
Notifications
You must be signed in to change notification settings - Fork 254
[Windows] Move to Visual Studio 2019 #632
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
Looks like GetVisualStudioVersion is still used elsewhere for setting environment variables and by DetectVisualStudioPath, which is only used to set environment variables, some of which are used later.
Given the GYP_ prefix, looks like they were never updated to GN_ during the gyp to gn migration. I wonder what, if anything, other than this script depends on these. I wouldn't try to fix that in this patch and I won't mention which person declared victory (apparently preemptively) after removing the last vestiges of gyp a couple years ago.
| MSVS_VERSIONS = collections.OrderedDict([ | ||
| ('2017', '15.0'), | ||
| ('2019', '16.0'), | ||
| ('2017', '15.0'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this line (2017) swapped with the previous (2019)?
It looks like the order matters here,
# in GetVisualStudioVersion
supported_versions_str = ', '.join('{} ({})'.format(v,k)
for k,v in list(MSVS_VERSIONS.items()))
# looks through supported versions to find which are currently available..
return available_versions[0] # will return 2019 if 2019 is foundThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup that's right, these are ordered by priority. There's a comment above this, let me know if you have suggestions to improve clarity:
https://github.com/flutter/buildroot/blob/master/build/vs_toolchain.py#L37
stuartmorgan-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Looked like the mystery crash that prevented me from doing this a long time ago is gone 🎉
This reverts commit 24bd842.
Reverts #632 After #632, the buildroot cannot be rolled to the engine without the corresponding changes in flutter/engine#36606. However, flutter/engine#36606 was reverted as it broke the Flutter tree. This reverts #632 to allow buildroot to engine rolls while I figure out the bug that broke the tree. Revert issue: flutter/flutter#112894
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 draft pull request to update the engine: flutter/engine#36538
This is a requirement to roll ANGLE as it is affected by an STL bug if built using Visual Studio 2017: angleproject#7693
Part of: flutter/flutter#110948
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.