xdc: A hypothetical D cross-compiler and AST manipulation tool.

Chad Joan chadjoan at gmail.com
Mon Nov 11 17:32:14 PST 2013


On Monday, 11 November 2013 at 08:11:06 UTC, Kai Nacke wrote:
> On Friday, 19 July 2013 at 13:38:12 UTC, Chad Joan wrote:
>> I think a C backend would get us farther than an LLVM backend.
>
> Hi,
>
> LLVM has a C++ backend in the git tree. The old C backend is 
> still maintained outside the git tree (search the dev mailing 
> list for an url).
>
> So if you like C-output, you can start with LDC today. For 
> sure, you have to port druntime to this new environemnt...
>
> Regards,
> Kai

Is there any built-in support for using this C++ backend in LDC 
right now?  Something like "ldc --target=c++ main.d -o main.cpp"?

This seems very promising.

I would still want to write xdc for other reasons, but I have 
more immediate use for a D compiler that can output C/C++ code.  
If it works, I would probably down-prioritize C/C++ output in xdc 
and instead retarget on something more needed (like Java bytecode 
or Javascript).


More information about the Digitalmars-d mailing list