[LLVMdev] [PATCH] llvm-config: add svn revision to --version

Benjamin Kramer benny.kra at googlemail.com
Mon May 18 05:56:21 PDT 2009


At the moment llvm-config outputs "2.6svn" if llvm is build from trunk

$ llvm-config --version
2.6svn

Some external projects (built out-of-tree) need to know which revision  
of llvm is installed. LDC currently asks llvm-config --src-root for  
the source directory and then parses svn info's output to get the  
revision number. This requires the user to keep the llvm source tree  
around even if it is not needed to build ldc.

The attached patch modifies the llvm build system (both autotools and  
cmake) to write the revision into PACKAGE_VERSION:

$ llvm-config --version
2.6-71981

or, if it couldn't find svn during the build:

$ llvm-config --version
2.6-svn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: revversion.patch
Type: application/octet-stream
Size: 1846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090518/ebd8d507/attachment.obj>
-------------- next part --------------



More information about the llvm-dev mailing list