3535
3636 # taiki-e/setup-cross-toolchain-action pulls a prebuilt musl toolchain
3737 # from ghcr.io/taiki-e/rust-cross-toolchain, sidestepping musl.cc which
38- # is unreliable. The action installs binaries named with the Rust triple
39- # (x86_64-unknown-linux-musl-gcc); we symlink them to the names cc_precompiler
40- # expects (x86_64-linux-musl-gcc) so the artefact filenames stay stable.
38+ # is unreliable. The toolchain ships binaries under both the Rust triple
39+ # name (x86_64-unknown-linux-musl-gcc) AND the short triple name
40+ # (x86_64-linux-musl-gcc), so cc_precompiler's existing config works
41+ # against /usr/local/bin without any further mapping.
4142 - name : Install musl cross-toolchain (x86_64)
4243 uses : taiki-e/setup-cross-toolchain-action@v1
4344 with :
@@ -48,20 +49,13 @@ jobs:
4849 with :
4950 target : aarch64-unknown-linux-musl
5051
51- - name : Map musl toolchain names for cc_precompiler
52+ - name : Verify musl cross-compilers are on PATH
5253 run : |
5354 set -eu
5455 for arch in x86_64 aarch64; do
55- for tool in gcc g++; do
56- src="/usr/local/bin/${arch}-unknown-linux-musl-${tool}"
57- dst="/usr/local/bin/${arch}-linux-musl-${tool}"
58- if [ ! -e "$src" ]; then
59- echo "::error::Expected $src to exist after taiki-e/setup-cross-toolchain-action"
60- exit 1
61- fi
62- sudo ln -sf "$src" "$dst"
63- echo "Linked $dst -> $src"
64- done
56+ command -v "${arch}-linux-musl-gcc" >/dev/null \
57+ || { echo "::error::${arch}-linux-musl-gcc not found on PATH"; exit 1; }
58+ "${arch}-linux-musl-gcc" --version | head -1
6559 done
6660
6761 - name : Install GNU cross-compilers
0 commit comments