summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoconf/configure.ac1
-rwxr-xr-xbindings/go/build.sh3
-rw-r--r--bindings/go/llvm/version.go20
-rwxr-xr-xconfigure5
-rw-r--r--include/llvm/Config/config.h.in3
-rw-r--r--include/llvm/Config/llvm-config.h.cmake3
-rw-r--r--include/llvm/Config/llvm-config.h.in3
7 files changed, 34 insertions, 4 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 31d462b424..ca6d710e7d 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -42,6 +42,7 @@ LLVM_VERSION_SUFFIX=svn
AC_DEFINE_UNQUOTED([LLVM_VERSION_MAJOR], $LLVM_VERSION_MAJOR, [Major version of the LLVM API])
AC_DEFINE_UNQUOTED([LLVM_VERSION_MINOR], $LLVM_VERSION_MINOR, [Minor version of the LLVM API])
AC_DEFINE_UNQUOTED([LLVM_VERSION_PATCH], $LLVM_VERSION_PATCH, [Patch version of the LLVM API])
+AC_DEFINE_UNQUOTED([LLVM_VERSION_STRING], "$PACKAGE_VERSION", [LLVM version string])
AC_SUBST([LLVM_VERSION_MAJOR])
AC_SUBST([LLVM_VERSION_MINOR])
diff --git a/bindings/go/build.sh b/bindings/go/build.sh
index 3f0be00f80..3177852aeb 100755
--- a/bindings/go/build.sh
+++ b/bindings/go/build.sh
@@ -26,6 +26,3 @@ else
fi
$llvm_go print-config > $gollvmdir/llvm_config.go
-
-llvm_version="$($llvm_config --version)"
-printf "package llvm\n\nconst Version = \"%s\"\n" "$llvm_version" > $gollvmdir/version.go
diff --git a/bindings/go/llvm/version.go b/bindings/go/llvm/version.go
index 59385838fa..d0623be97a 100644
--- a/bindings/go/llvm/version.go
+++ b/bindings/go/llvm/version.go
@@ -1,3 +1,21 @@
+//===- version.go - LLVM version info -------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines LLVM version information.
+//
+//===----------------------------------------------------------------------===//
+
package llvm
-const Version = "3.6.0svn"
+/*
+#include "llvm/Config/llvm-config.h"
+*/
+import "C"
+
+const Version = C.LLVM_VERSION_STRING
diff --git a/configure b/configure
index 597d119c2a..4bfc2e595d 100755
--- a/configure
+++ b/configure
@@ -1941,6 +1941,11 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define LLVM_VERSION_STRING "$PACKAGE_VERSION"
+_ACEOF
+
+
diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in
index beed1182c3..8fcf14548f 100644
--- a/include/llvm/Config/config.h.in
+++ b/include/llvm/Config/config.h.in
@@ -543,6 +543,9 @@
/* Patch version of the LLVM API */
#undef LLVM_VERSION_PATCH
+/* LLVM version string */
+#undef LLVM_VERSION_STRING
+
/* The shared library extension */
#undef LTDL_SHLIB_EXT
diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake
index 58111644ff..77201e6330 100644
--- a/include/llvm/Config/llvm-config.h.cmake
+++ b/include/llvm/Config/llvm-config.h.cmake
@@ -92,6 +92,9 @@
/* Minor version of the LLVM API */
#cmakedefine LLVM_VERSION_MINOR ${LLVM_VERSION_MINOR}
+/* LLVM version string */
+#define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
+
/* Define if we link Polly to the tools */
#cmakedefine LINK_POLLY_INTO_TOOLS
diff --git a/include/llvm/Config/llvm-config.h.in b/include/llvm/Config/llvm-config.h.in
index 5656240eb1..2d6add71a4 100644
--- a/include/llvm/Config/llvm-config.h.in
+++ b/include/llvm/Config/llvm-config.h.in
@@ -92,4 +92,7 @@
/* Minor version of the LLVM API */
#undef LLVM_VERSION_MINOR
+/* LLVM version string */
+#undef LLVM_VERSION_STRING
+
#endif