Generating Javascript or asm.js from LDC?

Laeeth Isharc via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Sat Sep 5 14:24:29 PDT 2015


On Saturday, 5 September 2015 at 15:23:18 UTC, David Nadlinger 
wrote:
> On 5 Sep 2015, at 17:29, Laeeth Isharc via digitalmars-d-ldc 
> wrote:
>> I guess you would need to implement within LDC js architecture 
>> and emscripten OS, so perhaps it's not quite so 
>> straightforward...
>
> Just looked at the developer docs you linked, and it seems like 
> they indeed have a custom LLVM fork. The easiest thing to do 
> would probably be to compile LDC against that fork (just point 
> the LLVM_CONFIG CMake variable at their llvm-config binary). 
> Apart from that, not much should be needed per se (apart from 
> adding it as a recognized OS in a couple of places that might 
> report an error otherwise, e.g. in the code that sets the 
> linux/Windows/Darwin/... version definitions).
>
>  — David

Very cool if this is the case.  I don't really know my way around 
LLVM, let alone LDC or emscripten.  I'll have a try.  But even if 
its beyond what I can do for now, the payoff seems pretty good if 
it turns out to be not so much work.



More information about the digitalmars-d-ldc mailing list