So what is the state of cross-compilation in D?

Jacob Carlborg doob at me.com
Wed Jan 17 17:45:55 UTC 2018


On 2018-01-17 13:06, Rel wrote:
> Well, to be completely honest with you the only one
> thing I like about the Go programming language is the
> ability to easily cross-compile your Go program from
> any supported OS to any supported OS.
> 
> So I was wondering what is the story of cross-compilation
> for different D language compilers? Is it possible to some
> extent now? 

Yes, it works with LDC.

> Do you guys have interest in it?

Yes.

> Basically as far as I understood what makes Go suitable
> for cross-compilation is their own linker implementation,
> and D compilers use current system linker.

If the system linker supports cross-compilation it's no problem. Here's 
a Dockerfile [1] with LDC that cross-compiles to macOS.

[1] 
https://github.com/jacob-carlborg/docker-ldc-darwin/blob/master/Dockerfile

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list