DMD as cross-compiler

H. S. Teoh hsteoh at
Wed Nov 11 19:16:55 UTC 2020

On Wed, Nov 11, 2020 at 05:11:51PM +0000, Adam D. Ruppe via Digitalmars-d wrote:
> On Wednesday, 11 November 2020 at 16:57:53 UTC, Stefan Koch wrote:
> > But what would be a target?
> > ARM?
> > MIPS?
> Windows, Linux, and Mac I'd imagine.
> I tend to just run `wine dmd` to do linux-> windows but it might still
> be useful anyway.

I prefer LDC for cross-compiling, as it can do both Windows and Android

> this reminds me i still need to make my generic ldc x-compile setup
> program.

I just download and unpack both the Linux and Windows versions of LDC,
then add this to ldc2.conf (for Linux version):

	    switches = [
	    lib-dirs = [

Then just compile with `-mtriple=x84_64-windows-msvc` and it Just
Works(tm).  It's been awesome.


VI = Visual Irritation

More information about the Digitalmars-d mailing list