[llvm-branch-commits] [llvm-branch] r318344 - Merging r312043:

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Nov 15 14:26:48 PST 2017

Author: tstellar
Date: Wed Nov 15 14:26:48 2017
New Revision: 318344

URL: http://llvm.org/viewvc/llvm-project?rev=318344&view=rev
Merging r312043:

r312043 | rnk | 2017-08-29 14:44:21 -0700 (Tue, 29 Aug 2017) | 25 lines

[cmake] Stop putting the revision info in LLVM_VERSION_STRING

This reduces the number of build actions after a no-op commit from
thousands to about six, which should be acceptable. If six actions is
still too many, developers can disable the LLVM_APPEND_VC_REV cmake

llvm-config.h is a widely included header that should rarely change.
Before this patch, it would change after every re-configure. Very few
users of llvm-config.h need to know the precise version, and those that
do can migrate to incorporating LLVM_REVISION as provided by

This should bring LLVM back to the behavior that it had before r306858
from June 30 2017. Most LLVM tools will now print a version string like
"6.0.0svn" instead of "6.0.0-git-c40c2a23de4".

Fixes PR34308

Reviewers: pcc, rafael, hans

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D37272


Modified: llvm/branches/release_50/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_50/CMakeLists.txt?rev=318344&r1=318343&r2=318344&view=diff
--- llvm/branches/release_50/CMakeLists.txt (original)
+++ llvm/branches/release_50/CMakeLists.txt Wed Nov 15 14:26:48 2017
@@ -208,10 +208,6 @@ include(VersionFromVCS)
   "Embed the version control system revision id in LLVM" ON)
-  add_version_info_from_vcs(PACKAGE_VERSION)
 set(PACKAGE_BUGREPORT "http://llvm.org/bugs/")

Modified: llvm/branches/release_50/docs/CMake.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_50/docs/CMake.rst?rev=318344&r1=318343&r2=318344&view=diff
--- llvm/branches/release_50/docs/CMake.rst (original)
+++ llvm/branches/release_50/docs/CMake.rst Wed Nov 15 14:26:48 2017
@@ -248,9 +248,10 @@ LLVM-specific variables
   Embed version control revision info (svn revision number or Git revision id).
-  This is used among other things in the LLVM version string (stored in the
-  PACKAGE_VERSION macro). For this to work cmake must be invoked before the
-  build. Defaults to ON.
+  The version info is provided by the ``LLVM_REVISION`` macro in
+  ``llvm/include/llvm/Support/VCSRevision.h``. Developers using git who don't
+  need revision info can disable this option to avoid re-linking most binaries
+  after a branch switch. Defaults to ON.
   Build with threads support, if available. Defaults to ON.

More information about the llvm-branch-commits mailing list