Linux -> Windows crosscompiler
kinke via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Sat May 27 16:33:26 PDT 2017
On Tuesday, 16 May 2017 at 08:22:04 UTC, Paolo Invernizzi wrote:
> I successfully cross compiled a simple "hello world"
> application on my Mac using something like:
>
> ldc2 -c -mtriple=x86_64-pc-windows-msvc main.d
> LIB=vc/lib lld-link main.obj ldc2_win/lib64/phobos2-ldc.lib
> ldc2_win/lib64/druntime-ldc.lib vc/lib/msvcrt.lib
>
> where I've copied a bunch of libraries in vc/lib, like the
> mscvrt.lib, shell32.lib etc, coming out from a previous wine
> attempt to use the microsoft linker in a dockerised environment.
This is being automated as part of integrating LLD into LDC.
Here's how you'll be able to cross-compile and -link from any
host to 32/64-bit MSVC targets:
https://github.com/ldc-developers/ldc/pull/2142#issuecomment-304472412
More information about the digitalmars-d-ldc
mailing list