On Saturday, 24 February 2018 at 10:03:07 UTC, Joakim wrote:
I've updated ldc master to use Yuxuan's druntime port, which
means the upcoming ldc 1.8 release will likely be a viable
Alpine/Musl cross-compiler out of the box, provided you give it
a C/Musl cross-compiler/linker to work with, by using the
bundled ldc-build-runtime tool:
https://wiki.dlang.org/Building_LDC_runtime_libraries
Cross-compiling has not been tested however: do people normally
cross-compile to Alpine containers or build their software in
Alpine itself? If the latter, building ldc from master on
Alpine/x64 3.7.0 passes all of the druntime/phobos stdlib unit
tests but one, so you're good to go there, as long as you don't
need a pre-built binary. Maybe we'll put one out for ldc with
the upcoming 1.8 release.
great stuff, thank you! this will be very useful!
Q: what would be needed to build a single binary (a la golang)
that works in a FROM SCRATCH docker container?