From 95ec4be02b72982246cf3b84133d1e5b1c44f3f6 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 23 Jul 2015 19:38:00 -0700 Subject: [PATCH] configure: Add support for VS 2015 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. --- configure | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 652b0b47766..58c927c9b00 100755 --- a/configure +++ b/configure @@ -1177,8 +1177,13 @@ do # INCLUDE and LIB variables for MSVC so we can set those in the # build system as well. install=$(reg QUERY \ - 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \ + 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \ -v InstallDir) + if [ -z "$install" ]; then + install=$(reg QUERY \ + 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \ + -v InstallDir) + fi need_ok "couldn't find visual studio install root" CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//') CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT") @@ -1460,12 +1465,22 @@ do msg "configuring LLVM with:" msg "$CMAKE_ARGS" + case "$CFG_MSVC_ROOT" in + *14.0*) + generator="Visual Studio 14 2015" + ;; + *12.0*) + generator="Visual Studio 12 2013" + ;; + *) + err "can't determine generator for LLVM cmake" + ;; + esac case "$t" in x86_64-*) - generator="Visual Studio 12 2013 Win64" + generator="$generator Win64" ;; i686-*) - generator="Visual Studio 12 2013" ;; *) err "can only build LLVM for x86 platforms"