[cfe-dev] libclang, someday?

Dan Villiom Podlaski Christiansen danchr at daimi.au.dk
Sun Aug 10 05:43:20 PDT 2008


On 10 Aug 2008, at 14:12, Cédric Venet wrote:

> Are you aware of the ccc script and/or llvmc2 (I think there is a  
> version
> for clang, otherwise it should be pretty easy to do)?
> Also, I may be wrong, but clang is more like cc1/cc1plus that gcc  
> since this
> is just the front end, or even less than these. For exemple the -O  
> flags
> don't do much sense for clang, but they will be usefull for opt.
> I think the idea is to have llvmc2 be the equivalent of gcc.

Based on a loose “feeling” from trying it on my 1.25GHz G4, I'd say  
ccc about twice as slow as using clang directly. I'm not familiar with  
llvmc2, I'm afraid. In my the driver with clang retains it's main  
selling point, speed, and has the potential to increase usage  
significantly.

Besides, is a reason for the main clang executable to be so  
incompatible? Of the many things clang is, one is a C/Objective-C  
compiler. Having one executable, included with clang and installed by  
default, that works as a drop in replacement for gcc, cc or another C- 
compiler is very useful indeed. For one thing, it could allow the many  
Autoconf/Automake/Make/configure based projects to easily try clang  
and report any bugs they find.

In this regard, accepting and ignoring -O* is crucial, as most other C  
compiler accept them. It's even somewhat standardised and required for  
the UNIX c99 executable. [1] Likewise, having to use a separate linker  
or filter out -Wall is annoying. It would be very nice if the goal of  
source-level compatibility with GCC was extended to also include  
invocation and supported flags.

[1] Single UNIX Specification v. 3: <http://www.opengroup.org/onlinepubs/009695399/utilities/c99.html 
 >

--

Dan Villiom Podlaski Christiansen, stud. scient.,
danchr at daimi.au.dk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1945 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080810/2e2b8b46/attachment.bin>


More information about the cfe-dev mailing list