llvm.org GIT mirror llvm / 2dea1fe
Expose LLVM version string via macro in llvm-config.h, and modify Go bindings to make use of it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222307 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Collingbourne 4 years ago
7 changed file(s) with 34 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
4141 AC_DEFINE_UNQUOTED([LLVM_VERSION_MAJOR], $LLVM_VERSION_MAJOR, [Major version of the LLVM API])
4242 AC_DEFINE_UNQUOTED([LLVM_VERSION_MINOR], $LLVM_VERSION_MINOR, [Minor version of the LLVM API])
4343 AC_DEFINE_UNQUOTED([LLVM_VERSION_PATCH], $LLVM_VERSION_PATCH, [Patch version of the LLVM API])
44 AC_DEFINE_UNQUOTED([LLVM_VERSION_STRING], "$PACKAGE_VERSION", [LLVM version string])
4445
4546 AC_SUBST([LLVM_VERSION_MAJOR])
4647 AC_SUBST([LLVM_VERSION_MINOR])
2525 fi
2626
2727 $llvm_go print-config > $gollvmdir/llvm_config.go
28
29 llvm_version="$($llvm_config --version)"
30 printf "package llvm\n\nconst Version = \"%s\"\n" "$llvm_version" > $gollvmdir/version.go
0 //===- version.go - LLVM version info -------------------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines LLVM version information.
10 //
11 //===----------------------------------------------------------------------===//
12
13 package llvm
114
2 const Version = "3.6.0svn"
15 /*
16 #include "llvm/Config/llvm-config.h"
17 */
18 import "C"
19
20 const Version = C.LLVM_VERSION_STRING
19401940 _ACEOF
19411941
19421942
1943 cat >>confdefs.h <<_ACEOF
1944 #define LLVM_VERSION_STRING "$PACKAGE_VERSION"
1945 _ACEOF
1946
1947
19431948
19441949
19451950
542542 /* Patch version of the LLVM API */
543543 #undef LLVM_VERSION_PATCH
544544
545 /* LLVM version string */
546 #undef LLVM_VERSION_STRING
547
545548 /* The shared library extension */
546549 #undef LTDL_SHLIB_EXT
547550
9191 /* Minor version of the LLVM API */
9292 #cmakedefine LLVM_VERSION_MINOR ${LLVM_VERSION_MINOR}
9393
94 /* LLVM version string */
95 #define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
96
9497 /* Define if we link Polly to the tools */
9598 #cmakedefine LINK_POLLY_INTO_TOOLS
9699
9191 /* Minor version of the LLVM API */
9292 #undef LLVM_VERSION_MINOR
9393
94 /* LLVM version string */
95 #undef LLVM_VERSION_STRING
96
9497 #endif