mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
Expose LLVM version string via macro in llvm-config.h, and modify Go bindings
to make use of it. llvm-svn: 222307
This commit is contained in:
parent
79f6f3ce15
commit
a8e90e764e
@ -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])
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
5
configure
vendored
5
configure
vendored
@ -1941,6 +1941,11 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define LLVM_VERSION_STRING "$PACKAGE_VERSION"
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -92,4 +92,7 @@
|
||||
/* Minor version of the LLVM API */
|
||||
#undef LLVM_VERSION_MINOR
|
||||
|
||||
/* LLVM version string */
|
||||
#undef LLVM_VERSION_STRING
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user