Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is to solve #2 partially by providing a way to build a single binary with dlang.
Preparing host compilers for Alpine Linux (i.e. with musl libc) is time consuming task because dmd, gdc and ldc do not provide a binary for it.
Instead of that, this request provides a way to build an ubuntu image with a cross compiler for musl libc.
It enables us to build a single binary with dlang and I guess it covers most use cases that use Alpine Linux.
This request only adds
ldc-ubuntu-musl
image because ldc providesldc-build-runtime
that easily builds runtime libraries for other architecture but other compilers do not.ldc-ubuntu-musl
image is built based on the dockerfile forldc-ubuntu
.It sets-mtriple=x86_64-alpine-linux-musl
and-static
by default.Sorry, I found that
rdmd
does not work if these options are the default setting.To make less confusion, I make them as an option.
Limitations:
std.net.curl
does not work because libcurl (installed via apt) is build with glibc-static
(it is provided in the default settings) because I failed to prepare dynamic link libraries with musl libc(See a thread in gitter chat of ldc)