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

Benjamin Kramer benny.kra at googlemail.com
Mon May 18 07:56:55 PDT 2009


Frits van Bommel wrote:

> I don't think that's enough for LDC; we want to be able to compare  
> the version
> with #if, so we need it to produce something like '#define LLVM_REV  
> 71981' (i.e.
> a raw integer, not a string).

Here is another patch which adds a new option to llvm-config:

$ llvm-config --revision


or, if the build script couldn't find svn:

$ llvm-config --revision
0

I think this is also a safer approach, it won't break anything that  
relies on the
current llvm-config behavior.

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



More information about the llvm-dev mailing list