taiki-e / setup-cross-toolchain-action

GitHub Action for setup toolchains for cross compilation and cross testing for Rust.
Apache License 2.0
32 stars 3 forks source link

Add support for x86_64-unknown-linux-musl #6

Closed k0lter closed 1 year ago

k0lter commented 1 year ago

Here is a pull request to support the x86_64-unknown-linux-musl target.

I've disabled the run of binaries in CI as they are segfault-ing for an unknown reason (by now).

I've built a "real project" with this new target (see: https://github.com/k0lter/wr/releases/tag/v0.1.4) and the x86_64-unknown-linux-musl binaries are working fine.

taiki-e commented 1 year ago

Thanks for the PR!

I've disabled the run of binaries in CI as they are segfault-ing for an unknown reason (by now).

I'm not sure why segfault is occurring, but I remember encountering a similar segfault when I tried to support musl before: https://github.com/taiki-e/setup-cross-toolchain-action/actions/runs/2689274534/jobs/4193489259

I've built a "real project" with this new target (see: https://github.com/k0lter/wr/releases/tag/v0.1.4) and the x86_64-unknown-linux-musl binaries are working fine.

upload-rust-binary-action's heuristic for detecting host cross-compilation setup currently refers to whether target linker or target runner is set. So, that release was built using cross and not setup-cross-toolchain-action. (The logs also show that cross is being used: https://github.com/k0lter/wr/actions/runs/3096734379/jobs/5012617145)

fosskers commented 1 year ago

Hi, any news on this PR? I'll try @k0lter 's fork for now and see what happens.

fosskers commented 1 year ago

I instead followed these instructions for using cross in a (nearly) first-class way through Actions provided by actions-rs.