[cfe-dev] How to dump clang version

Devchandra L Meetei dlmeetei at gmail.com
Thu Jul 19 01:45:10 PDT 2012


We thought of porting our project to clang, and make it require clang V 3
and above, as clang 2.9 can not link properly.
So on detection of lesser version, We would like to print that version is
not supported.

so need the version number.


On Thu, Jul 19, 2012 at 2:05 PM, Jean-Daniel Dupas
<devlists at shadowlab.org>wrote:

>
> -dumpversion is used only for compat with GCC and should not be used to
> determine clang actual version, and so it returns the last GCC version
> clang pretends to be.
>
> Usually you shouldn't try to enable feature based on clang version. Why do
> you need it ?
>
>
> Le 19 juil. 2012 à 10:03, Devchandra L Meetei <dlmeetei at gmail.com> a
> écrit :
>
> but
> [deleisha at deleisha CertificateProvider]$ clang++ -dumpversion
> 4.2.1
> [deleisha at deleisha CertificateProvider]$ clang -v
> clang version 3.0 (tags/RELEASE_30/final)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> [deleisha at deleisha CertificateProvider]$
>
> why this difference, sorry for silly questions
>
>
> On Thu, Jul 19, 2012 at 1:31 PM, Devchandra L Meetei <dlmeetei at gmail.com>wrote:
>
>> Oh, It works, last time when I tried, It was not. and I dig more and last
>> time, it did not work due to a typos.
>> Thanks
>>
>> --Dev
>>
>>
>> On Thu, Jul 19, 2012 at 1:29 PM, Seo Sanghyeon <sanxiyn at gmail.com> wrote:
>>
>>> > is there way to dump the version of clang something like
>>> > gcc -dumpversion.
>>>
>>> Have you tried the obvious?
>>> clang -dumpversion
>>>
>>
>>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
> -- Jean-Daniel
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120719/efcb10c3/attachment.html>


More information about the cfe-dev mailing list