-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
trans: Try to detect the Universal CRT on MSVC #27250
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Another example of where this helps is that all our |
4ee257e
to
a6ce70b
Compare
Adds support to the configure script for detecting Visual Studio 2015 being installed and builds LLVM/uses cl with that compiler. The compiler will automatically use this MSVC linker anyway because it's the highest version.
MSBuild's logic for finding uCRT can be found in this file: |
@vadimcn oh nice! Do you know if there's a better way to detect whether an VS installation is using the uCRT? Right now the logic would be something along the lines of "If the VS installation folder '14.0' in it then look at the registry entry (you specified above), find the max 'KitsRootXXX' key, probe for the version of the ucrt (max numerical value in the Lib/ folder), and then add the appropriate LIB path". I'm somewhat uncomfortable about:
I definitely think though that finding the installation root through the registry is probably better than "find the 8.1 one and then pop a directory and add a 10 onto it" :) |
Also, it looks like |
Visual Studio 2015, recently released, includes the Universal CRT, a different flavor than was provided before. The binaries and header files for this library are included in new locations not previously known about by gcc-rs, and this commit adds support for the necessary probing to find these. Unfortunately there are no prior examples of this probing to be found in frameworks like CMake or clang, so this is done is a bit of a sketchy method today. It assumes that the installation is in a relatively standard format and then blindly looks for the location of the UCRT. I'd love to switch this over to using registry keys for probing, but I was currently unable to find such keys. This should enable the compiler to work outside VS 2015 dev tools prompts.
@bors r+ |
📌 Commit 7bb585d has been approved by |
Visual Studio 2015, recently released, includes the Universal CRT, a different flavor than was provided before. The binaries and header files for this library are included in new locations not previously known about by gcc-rs, and this commit adds support for the necessary probing to find these. Unfortunately there are no prior examples of this probing to be found in frameworks like CMake or clang, so this is done is a bit of a sketchy method today. It assumes that the installation is in a relatively standard format and then blindly looks for the location of the UCRT. I'd love to switch this over to using registry keys for probing, but I was currently unable to find such keys. This should enable the compiler to work outside VS 2015 dev tools prompts.
Visual Studio 2015, recently released, includes the Universal CRT, a different
flavor than was provided before. The binaries and header files for this library
are included in new locations not previously known about by gcc-rs, and this
commit adds support for the necessary probing to find these.
Unfortunately there are no prior examples of this probing to be found in
frameworks like CMake or clang, so this is done is a bit of a sketchy method
today. It assumes that the installation is in a relatively standard format and
then blindly looks for the location of the UCRT. I'd love to switch this over to
using registry keys for probing, but I was currently unable to find such keys.
This should enable the compiler to work outside VS 2015 dev tools prompts.