Skip to content

Commit

Permalink
Auto merge of #70619 - etherealist:musl_lld, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Enable rust-lld on dist-x86_64-musl

Add rust-lld to rustup llvm-tools-preview on nightly for musl

I am using a musl distro on my workstation, with `RUSTFLAGS="-C target-feature=-crt-static"` this works fine. I know that `x86_64-unknown-linux-musl` was originally only meant as a target and not as a host. But most problems have been fixed, and I have fewer problems with `unknown` (rustup) than when I am using `x86_64-alpine-linux-musl` (rust installed by the distro). The only thing I am missing is rust-lld in llvm-tools-preview on nightly.

I needed rust-lld for a wasm tutorial. I built rust-lld and tested it with that tutorial, and it worked well. I asked [here](https://users.rust-lang.org/t/enable-rust-lld-on-x86-64-unknown-linux-musl/39851) where to request to enable lld and ended up doing this PR.

I compared llvm-tools-preview `nightly-x86_64-unknown-linux-musl` and `nightly-x86_64-unknown-linux-gnu`: only rust-lld is missing in musl.

I tested the change using:

```bash
./src/ci/docker/run.sh dist-x86_64-musl
```

And I checked that the resulting rust-lld binary runs.
  • Loading branch information
bors committed Apr 10, 2020
2 parents 96d77f0 + a61a7c5 commit 167510f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ci/docker/dist-x86_64-musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ ENV RUST_CONFIGURE_ARGS \
--musl-root-x86_64=/usr/local/x86_64-linux-musl \
--enable-extended \
--disable-docs \
--enable-lld \
--set target.x86_64-unknown-linux-musl.crt-static=false \
--build $HOSTS

Expand Down

0 comments on commit 167510f

Please sign in to comment.