]> git.lizzy.rs Git - rust.git/commit
trans: Try to detect the Universal CRT on MSVC
authorAlex Crichton <alex@alexcrichton.com>
Thu, 23 Jul 2015 23:10:04 +0000 (16:10 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 24 Jul 2015 18:14:50 +0000 (11:14 -0700)
commit7bb585da5b198022e93cb9822fe53d5b1693c762
tree64cb5b7ff30edebfde39978b343a342384df5663
parent95ec4be02b72982246cf3b84133d1e5b1c44f3f6
trans: Try to detect the Universal CRT on MSVC

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.
src/librustc_trans/back/msvc/mod.rs