[LLVMdev] Byte code portability (was Re: libstdc++ as bytecode, and compiling C++ to C)

Reid Spencer rspencer at reidspencer.com
Thu Nov 23 11:16:20 PST 2006


On Thu, 2006-11-23 at 19:10 +0100, Philipp Klaus Krause wrote:
> Pertti Kellomäki schrieb:
> > Chris Lattner wrote:
> >> Many aspects of the target compiler can leak through.
> > 
> > So if one wants to use the LLVM system as a cross compiler, one
> > has to configure llvm-gcc as a cross compiler? Fair enough, I guess.
> 
> I hope the C backend is still meant to generate portable code though.

It generates C99. Its portability is no better or worse than any other
backend. Again, it is the front end that decides how portable the
outcome can be. If the front end uses non-portable constructs (sizeof,
ifdef code, etc.) then the code produced won't be portable either.  To
get LLVM to generate portable code, you must start with a portable
language.  This is the goal of HLVM (http://hlvm.org/) which is no where
near done yet.

> 
> Philipp
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list