[cfe-dev] [PATCH] Add support for git svn to get the repo version in clang executable

Mulder, Jonathan mulderje at muohio.edu
Tue Aug 3 13:51:22 PDT 2010


I recently checked out the repo using git-svn, and I noticed when I built
clang that the word "trunk" was missing from the version info.

This is what was showing up...
clang version 2.8 ($URL$ 110106) # because it is not taking the value from
svn
Target: i386-apple-darwin10
Thread model: posix

Instead of...
clang version 2.8 (trunk 110106)
Target: i386-apple-darwin10
Thread model: posix

So, I went on IRC and Daniel thought that it might be a good idea to do it
like it is done with the revision number, so here is my take on it.

GetRepositoryPath goes in llvms' utils folder, and the rest of the patch is
for clang.

One thing to note is that I did this only for the Makefile and not for
cmake, so that may cause issues. Either way, let me know what you think, and
if you want me to change anything.

Thanks,
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100803/d6be3691/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GetRepositoryPath
Type: application/octet-stream
Size: 636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100803/d6be3691/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: git_repo_path.patch
Type: application/octet-stream
Size: 1982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100803/d6be3691/attachment-0001.obj>


More information about the cfe-dev mailing list