Skip to content

Commit 95ec4be

Browse files
committed
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.
1 parent c85ba3e commit 95ec4be

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

configure

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,8 +1177,13 @@ do
11771177
# INCLUDE and LIB variables for MSVC so we can set those in the
11781178
# build system as well.
11791179
install=$(reg QUERY \
1180-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1180+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \
11811181
-v InstallDir)
1182+
if [ -z "$install" ]; then
1183+
install=$(reg QUERY \
1184+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1185+
-v InstallDir)
1186+
fi
11821187
need_ok "couldn't find visual studio install root"
11831188
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11841189
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
@@ -1460,12 +1465,22 @@ do
14601465

14611466
msg "configuring LLVM with:"
14621467
msg "$CMAKE_ARGS"
1468+
case "$CFG_MSVC_ROOT" in
1469+
*14.0*)
1470+
generator="Visual Studio 14 2015"
1471+
;;
1472+
*12.0*)
1473+
generator="Visual Studio 12 2013"
1474+
;;
1475+
*)
1476+
err "can't determine generator for LLVM cmake"
1477+
;;
1478+
esac
14631479
case "$t" in
14641480
x86_64-*)
1465-
generator="Visual Studio 12 2013 Win64"
1481+
generator="$generator Win64"
14661482
;;
14671483
i686-*)
1468-
generator="Visual Studio 12 2013"
14691484
;;
14701485
*)
14711486
err "can only build LLVM for x86 platforms"

0 commit comments

Comments
 (0)