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

Sebastian Redl sebastian.redl at getdesigned.at
Fri Jun 26 08:16:49 PDT 2009


Dallman, John wrote:
> 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? 
>   
It's simpler, actually. The dylib doesn't contain LLVM bitcode anymore;
it's a perfectly normal machine code object. It should be (according to
the project goals) 100% binary compatible with GCC-compiled code. So
there should be no compatibility issues at all.

Sebastian



More information about the cfe-dev mailing list