[PATCH] D34560: Completelly disable git/svn version checking if not needed

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 13:54:25 PDT 2017


rnk added a comment.

In https://reviews.llvm.org/D34560#855735, @pcc wrote:

> I thought that the purpose of this change was to make thinlto use LLVM_APPEND_VC_REV to control whether to add the VCS revision to the hash. Or do you think there should be a separate CMake variable to control whether thinlto uses the VCS revision?


I think I see what happened now.

LLVM_APPEND_VC_REV was a dormant option that probably nobody was using. The effect of that option was to add the revision to LLVM_VERSION_STRING in llvm-config.h, which causes llvm-config.h to change after every git commit. This is, IMO, completely undesirable.

Because that functionality was disabled by default, you and others (Jordan?) created VCSRevision.h and the things that came before it to compute accurate version information as part of the build. Rafael didn't want actions to run after changing git branches, so he wrote this patch to put the behavior under this flag. Because you requested the default to change, now everyone is getting the unintended updates to llvm-config.h, causing much larger rebuilds.

However, nobody noticed for months, because cmake caches option settings when it builds. In order to observe the new LLVM_APPEND_VC_REV default value, you have to delete CMakeCache.txt.

I think the default behavior should go back to what it was before this change, where LLVM_REVISION is incorporated into the ThinLTO hash, and we don't have a full rebuild after every cmake run. I'll send a patch.


https://reviews.llvm.org/D34560





More information about the llvm-commits mailing list