Skip to content

Commit

Permalink
Remove tier 3 linux-musl targets from officially supported targets
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Oct 10, 2023
1 parent 91e2ebd commit 6155153
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 28 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- main
- dev
schedule:
- cron: '0 1 * * *'
- cron: '0 2 * * *'
workflow_dispatch:

env:
Expand Down Expand Up @@ -60,10 +60,10 @@ jobs:
- i686-unknown-linux-gnu
- loongarch64-unknown-linux-gnu
# - m68k-unknown-linux-gnu # tier3, build fail: https://github.com/rust-lang/rust/issues/89498
- mips-unknown-linux-gnu
- mips64-unknown-linux-gnuabi64
- mips64el-unknown-linux-gnuabi64
- mipsel-unknown-linux-gnu
- mips-unknown-linux-gnu # tier3
- mips64-unknown-linux-gnuabi64 # tier3
- mips64el-unknown-linux-gnuabi64 # tier3
- mipsel-unknown-linux-gnu # tier3
# - mipsisa32r6-unknown-linux-gnu # tier3, TODO: hang with LLVM 17
# - mipsisa32r6el-unknown-linux-gnu # tier3, TODO: hang with LLVM 17
- mipsisa64r6-unknown-linux-gnuabi64 # tier3
Expand Down Expand Up @@ -100,11 +100,11 @@ jobs:
# - target: hexagon-unknown-linux-musl # tier3
- target: i586-unknown-linux-musl
- target: i686-unknown-linux-musl
- target: mips-unknown-linux-musl
# - target: mips-unknown-linux-musl # tier3
# - target: mips64-openwrt-linux-musl # tier3
- target: mips64-unknown-linux-muslabi64
- target: mips64el-unknown-linux-muslabi64
- target: mipsel-unknown-linux-musl
# - target: mips64-unknown-linux-muslabi64 # tier3
# - target: mips64el-unknown-linux-muslabi64 # tier3
# - target: mipsel-unknown-linux-musl # tier3
# - target: powerpc-unknown-linux-musl # tier3
# - target: powerpc64-unknown-linux-musl # tier3
# - target: powerpc64le-unknown-linux-musl # tier3
Expand Down
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,28 +266,10 @@ You can select/pin the version by using `qemu` input option, or `@` syntax in `r
| `armv7-unknown-linux-musleabihf` | x86_64 Linux | qemu-user | |
| `i586-unknown-linux-musl` | x86_64 Linux | qemu-user (default), native | |
| `i686-unknown-linux-musl` | x86_64 Linux | native (default), qemu-user | |
| `mips-unknown-linux-musl` | x86_64 Linux | qemu-user | |
| `mips64-unknown-linux-muslabi64` | x86_64 Linux | qemu-user | |
| `mips64el-unknown-linux-muslabi64` | x86_64 Linux | qemu-user | |
| `mipsel-unknown-linux-musl` | x86_64 Linux | qemu-user | |
| `x86_64-unknown-linux-musl` | x86_64 Linux | native (default), qemu-user | |

(Other linux-musl targets supported by [rust-cross-toolchain](https://github.com/taiki-e/rust-cross-toolchain#linux-musl) may also work, although this action's CI has not tested them.)

`mips{,el}-unknown-linux-musl` are dynamically linked by default. To compile in the same way as other musl targets, you need to set `-C target-feature=+crt-static` and `-C link-self-contained=yes`. For example:

```yaml
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: mips-unknown-linux-musl
- run: cargo build
env:
# `-C target-feature=+crt-static` to enable static linking.
# `-C link-self-contained=yes` to link with libraries and objects shipped with Rust.
# `${{ env.RUSTFLAGS }}` is needed if you want to inherit existing rustflags.
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+crt-static -C link-self-contained=yes
```
For the `qemu-user` runner, see ["qemu-user runner" section for linux-gnu targets](#qemu-user-runner).

### Linux (uClibc)
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ run_native() {
run_tests() {
case "${target}" in
# TODO: LLVM bug: Undefined temporary symbol error when building std.
mips-unknown-linux-gnu | mipsel-unknown-linux-gnu | mips-unknown-linux-uclibc | mipsel-unknown-linux-uclibc) ;;
mips-*-linux-* | mipsel-*-linux-*) ;;
*)
profile=debug
cargo_run
Expand Down

0 comments on commit 6155153

Please sign in to comment.