summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-12-10 09:41:13 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-12-10 09:41:13 +0000
commit667f217a545ed9950c4a156524d2887db1d1832c (patch)
tree89e53a4a06c6028bbeb20692bc333808543a29d1 /clang/lib/Sema/SemaChecking.cpp
parentdf0b779e9ff6f691fa772eb573d2cb39b4e7b98a (diff)
downloadbcm5719-llvm-667f217a545ed9950c4a156524d2887db1d1832c.tar.gz
bcm5719-llvm-667f217a545ed9950c4a156524d2887db1d1832c.zip
At the request of Michael Spencer, make the VCS version detection logic
in CMake a bit more handy. Previously we would get such charming versions as the following for revision NNNN and commit-ish XXXXX: 3.1svnsvn-rNNNN 3.1svngit-svn-rNNNN 3.1svngit-svn-XXXXX The mechanism selecting betwene the latter two was particularly odd, and didn't work with all of the ways git-svn repos are set up apparently. It also misses an important point -- both the revision *and* the git commit might be relevant when working on a local branch some distance from mainline. The new logic does several things: 1) It strips the redundant initial 'svn'. 2) It always looks for a git-svn revision number base, and when found includes it in the version. 3) If the git commit-ish for the current HEAD is not exactly that revision number, it is also included. The resulting strings should roughly be: 3.1svn-rNNNN 3.1git-svn-rNNNN 3.1git-svn-rNNNN-XXXXX Suggestions on formatting etc always welcome. =] I've only looked at the LLVM version string here, not Clang's (yet). Note that the commit-ish reported is *not* terribly accurate. It updates when 'cmake' is run, not when the binary is built. Still, it may be better than nothing, especially if people have fairly long-lived git repos and branches. This is not a new limitation, just didn't want anyone to be surprised. llvm-svn: 146323
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud