C backend for D

sarn sarn at theartofmachinery.com
Thu Mar 5 22:52:49 UTC 2020


On Thursday, 5 March 2020 at 21:43:45 UTC, Stefan Koch wrote:
> On Thursday, 5 March 2020 at 20:51:40 UTC, Dibyendu Majumdar 
> wrote:
>> Has there ever been an attempt to create a C backend for D?
> There are also approaches which use the unofficial LLVM C 
> backend via a custom build of LDC.

Yep, I've experimented with using using this with (plain) LDC:
https://github.com/JuliaComputing/llvm-cbe

I got "Hello World" to work, but unfortunately llvm-cbe's forward 
reference generation is buggy, so I gave up trying to get 
anything more complicated to compile.

Credit goes to this post for the original inspiration:
https://qiita.com/mono_shoo/items/81b98ac5656a47617232
(Post from the Japanese D community about using llvm-cbe to run D 
on a microcontroller.)


More information about the Digitalmars-d mailing list