-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Clang 12 and resolve forward-compatibility issue with MSVC STL #176
Comments
According to GitHub's documentation, only It looks like I've been pinning to They also install |
I created a test GitHub Action to list all the versions of MSVC which are installed on the runners. PathogenPlayground/GitHubActionsTest@7429e60 and it found the following:
|
As a workaround I'm just hard-coding 14.25 is good enough for CI purposes (and probably even using purposes.) It was specifically added to the GitHub runners in actions/runner-images#1076 for solve issues similar to ours, so I don't see it going away any time soon. (It's not like this is some latest LTS version or something.) I think by the time it goes away we'll probably have moved to Clang 11 or to a more formalized system for selecting the MSVC version using the installer API. If it does go away, it sounds like installing it during CI is reasonably fast. Installing an additional version of MSVC takes up about 1 GB, not sure how big the actual download is. |
Going straight to Clang 12. Bad timing on our part because it looks like Clang 13 is coming out soonish, but oh well. Here's how I got there:
I ran tests locally on Windows and everything is passing. Currently waiting on ClangSharp.Pathogen CI so I can test Linux CI and with actual generators. |
Something I somehow didn't notice before: You can actually disable the STL's version checks: A bit late now since we're moving to Clang 12, but it would've been interesting to try using that. I can't imagine it'd go super well though, my understanding is they bump the required version when they start using new C++ features implemented in that specific version. |
Forgot to tag this issue. Biohazrd uses Clang 12.0.1 as of ad822e7 |
The MSVC STL is making Clang 11 a requirement, seemingly starting with Visual Studio 16.10 as indicated by this new error:
microsoft/STL@58160d5#diff-bdd45474f9376628362c583aa24d827009c50f6c19e3148b225937224338a444
Looking around in this file, it seems to me that the purpose of this file is to detect what C++ features are supported by the compiler. In the case of this specific error check, it'd indicating the earliest version of Clang which supports the features needed by this version of the STL.
It might also be ideal to look into using a more appropriate version of the STL if possible. Clang's STL locating logic is fairly naïve, it'd be nice if we didn't get broken by the user having a newer version of the STL installed.
I believe the versions of the STL that get installed are tied to the build tools you have selected in the Visual Studio Installer. We can detect the versions of the STL associated with various MSVC tool versions by looking at
Path/To/VisualStudio/VC/Auxiliary/Build/Microsoft.VCToolsVersion.vXYZ.default.txt
.When multiple minor versions of the same toolset are installed, this is the newest version. Older versions can be found in a subfolder for the version. For example, with the following MSVC v142 versions installed:
You get the following versions of the STL available in
Path/To/VisualStudio/VC/Tools/MSVC
:Within
Path/To/VisualStudio/VC/Auxiliary/Build/
you'll have the following files pointing to the specific versions:14.20/Microsoft.VCToolsVersion.14.20.txt
14.20.27508
14.23/Microsoft.VCToolsVersion.14.23.txt
14.23.28105
Microsoft.VCToolsVersion.v142.default.txt
14.29.29917
Microsoft.VCToolsVersion.default.txt
14.29.29917
We might also be able to restrict things based on the installed components for a given Visual Studio instance.
The text was updated successfully, but these errors were encountered: