[PATCH] D18987: Make available a macro LLVM_REVISION that is populated with the svn/git revision.
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 11 12:41:33 PDT 2016
joker.eph created this revision.
joker.eph added a reviewer: beanz.
joker.eph added a subscriber: llvm-commits.
As I am adding caching to the compiler, we need to make sure entries
are invalidated on compiler changes.
http://reviews.llvm.org/D18987
Files:
CMakeLists.txt
include/llvm/Config/config.h.cmake
include/llvm/Config/llvm-config.h.cmake
Index: include/llvm/Config/llvm-config.h.cmake
===================================================================
--- include/llvm/Config/llvm-config.h.cmake
+++ include/llvm/Config/llvm-config.h.cmake
@@ -99,6 +99,9 @@
/* Patch version of the LLVM API */
#define LLVM_VERSION_PATCH ${LLVM_VERSION_PATCH}
+/* LLVM revision as a string */
+#define LLVM_REVISION_STRING "${LLVM_REVISION}"
+
/* LLVM version string */
#define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
Index: include/llvm/Config/config.h.cmake
===================================================================
--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -496,6 +496,9 @@
/* Patch version of the LLVM API */
#define LLVM_VERSION_PATCH ${LLVM_VERSION_PATCH}
+/* LLVM revision as a string */
+#define LLVM_REVISION_STRING "${LLVM_REVISION}"
+
/* LLVM version string */
#define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -109,8 +109,10 @@
option(LLVM_APPEND_VC_REV
"Append the version control system revision id to LLVM version" OFF)
+add_version_info_from_vcs(LLVM_REVISION)
if( LLVM_APPEND_VC_REV )
- add_version_info_from_vcs(PACKAGE_VERSION)
+ string(REPLACE "svn" "" PACKAGE_VERSION "${PACKAGE_VERSION}")
+ set(PACKAGE_VERSION "${PACKAGE_VERSION}${LLVM_REVISION}")
endif()
set(PACKAGE_NAME LLVM)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18987.53304.patch
Type: text/x-patch
Size: 1458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160411/7c52650b/attachment.bin>
More information about the llvm-commits
mailing list