Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2014-04-17 09:05:41 +0400
committerZoltan Varga <vargaz@gmail.com>2014-04-17 09:06:37 +0400
commit0b197c823449fb5696d29f0c67d7959a14bcdbed (patch)
tree17469455dadce2b01081405a3f4e8570f46ba7c3 /configure.in
parentc08bca90ee3f59493b6b9842d20e199a1872d4c8 (diff)
[llvm] Add a LLVM_API_VERSION define which is incremented in llvm every time there is a public api break. This allows the llvm backend to compile with different versions of LLVM.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 65b27c5a210..db7bebfe2ad 100644
--- a/configure.in
+++ b/configure.in
@@ -2452,6 +2452,7 @@ if test "x$enable_llvm" = "xyes"; then
llvm_version=`$LLVM_CONFIG --version`
major_version=`echo $llvm_version | cut -c 1`
minor_version=`echo $llvm_version | cut -c 3`
+ llvm_api_version=`$LLVM_CONFIG --mono-api-version 2>&1`
AC_MSG_CHECKING(LLVM version)
AC_MSG_RESULT($llvm_version)
if echo $llvm_version | grep -q 'mono'; then
@@ -2462,6 +2463,11 @@ if test "x$enable_llvm" = "xyes"; then
AC_MSG_ERROR([Expected llvm version $expected_llvm_version, but llvm-config --version returned $llvm_version"])
fi
fi
+ if test "x$llvm_api_version" = "x"; then
+ LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=0"
+ else
+ LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=$llvm_api_version"
+ fi
else
AC_MSG_ERROR([Compiling with stock LLVM is not supported, please use the Mono LLVM repo at https://github.com/mono/llvm, with the GIT branch which matches this version of mono, i.e. 'mono-2-10' for Mono 2.10.])
fi