Testing out the new cross-compilation support in ldc master

kinke via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Fri Aug 18 09:12:25 PDT 2017

Thanks for the write-up!

On Friday, 18 August 2017 at 07:34:04 UTC, Joakim wrote:
> Right now, it has to be built from the git repo, as the first 
> official release it will ship with is the upcoming ldc 1.4 beta

Not entirely true; we have CI builds for Windows, which happen to 
include our tailored (Android-ready) LLVM already. It obviously 
also includes the ldc-build-runtime tool (which btw is part of 
the `all` build target, no need to be built manually). So for a 
quick test on Windows, a recent CI build is already enough, and 
one only needs the prerequisites (Android NDK, CMake, ninja) and 
LDC source and can then start with the last step (5).

> kinke, will setting CC first work on Windows and other shells?

Nope, a combined command `CC=... ldc-build-runtime ...` doesn't 
work in the regular Windows shell. Environment variables need to 
be set (exported in Posix lingo) explicitly: `set CC=...`, then 
invoke the tool. That being said, I have no idea whether CMake 
honors that environment variable on Windows; if it doesn't, one 
should be able to fall back to `ldc-build-runtime 

> I hope you're not waiting on that PR to push the ldc 1.4 beta 
> out, kinke.

Nope, don't worry ;) - I think we're pretty much ready for 
1.4-beta1. DMD has already pushed out a 2.076 beta...

More information about the digitalmars-d-ldc mailing list