Having trouble cross compiling with LDC

o o at o.o
Sat Dec 8 22:16:32 UTC 2018


I have heard that LDC has great support for cross compilation, 
but I can't figure out how to use it.

I have a linux x64 host, and I am looking for a definitive step 
by step guide to setting up LDC to cross compile targeting 
windows x64, macosx, and linux arm64(raspberry pi).

 From what I understand, the basic steps are as follows (but I 
don't know how to actually go about doing them):

1. Use ldc-build-runtime to compile phobos library binaries for 
the target OS/Arch.

2. Run LDC, and tell it where to find the phobos binaries from 
step 1, and tell it to use lld as a linker.

3. LDC outputs an executable that can run on the target platform.

But, how do I actually go about doing these steps? How do I use 
ldc-build-runtime? How do I tell LDC to use the cross-compiled 
phobos/runtime instead of the default one?

Thanks!


More information about the Digitalmars-d mailing list