[cfe-dev] Targeting Clang?

Renato Golin rengolin at systemcall.org
Fri Nov 13 12:04:17 PST 2009


2009/11/13 Rick R <rick.richardson at gmail.com>:
> I am considering writing a LLVM back end for Scala. A major goal of mine is
> interoperability with C (and perhaps C++)
> Would it make sense to try to leverage parts of Clang for this purpose?

I think that recycling clang would not give you C++ interoperability
for free. Also, it could be more hassle to adapt the specific C/C++
semantics than it would be creating a new compiler from scratch.


> Failing any of that, does anyone have any recommendations for setting out to
> build an LLVM back end for a language with the goal of ABI compatibility in
> mind?

Scala is very different from C++. Building the IR functions the same
way might force you loose Scala semantics. I may be wrong, but if you
manage, binary compatibility should be taken care by the back-end
target code generator.

--renato

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm



More information about the cfe-dev mailing list