[cfe-dev] Using clang/LLVM components in conventional apps?

Dallman, John john.dallman at siemens.com
Fri Jun 26 05:57:30 PDT 2009

I heard of clang+LLVM as something that potentially offered better
performance for C and C++ code than GCC on Mac OS X. Things seem to
be at too early a stage for using it for that in commercial apps 
at present - I have noticed the C++ incompleteness - but I have a
few questions about how it might work in practice. 

I work on a commercial product that's a library of solid-modelling 
functions, which is licensed to CAD/CAM/CAE software vendors for use 
in their products. On Mac OS X it's a single large dylib, plus some 
C headers to compile against. It's compiled with a C compiler, not
a C++ compiler, because it's written in a special-purpose language 
that compiles to C. 

At one level, this should be quite straightforward: re-compile 
everything with a different command. 

But I haven't been able to find anything on the websites about how
you might drop a dylib built with clang into an application built
with GCC. Does this just work, via integration of LLVM into the 
loader, or is it more complex than that? 

I presume that if the end-user for such a library has a different 
version of LLVM from me, I'm at the mercy of differences in any 
behaviour? That's potentially a problem, because we have to test 
this code very thoroughly. 


John Dallman
Parasolid Porting Engineer

Siemens PLM Software
46 Regent Street, Cambridge, CB2 1DP
United Kingdom
Tel: +44-1223-371554
john.dallman at siemens.com

More information about the cfe-dev mailing list