Fix bug where we would try to use cross on ARM hosts for all targets

If the target is ARM and the host is ARM, this should work with just `cargo`. I'm not sure if this
works for all ARM host/target combos, or if the CPU architecture must be an exact match.

But it doesn't really matter too much, since at least for now there's no ARM builds for
`cross` (https://github.com/cross-rs/cross/issues/1612). So even if cross-compilation doesn't work
natively, we couldn't use `cross` in this case either.

I also rewrote the `set-cross-compile.sh` in Python. By "I", I mean I had Claude do it and then I
tweaked it.
This commit is contained in:
Dave Rolsky
2025-01-20 20:45:44 -06:00
parent 5b5d0b578b
commit 52839d91bd
4 changed files with 103 additions and 26 deletions

View File

@@ -76,7 +76,7 @@ runs:
- name: Determine whether we need to cross-compile
id: determine-cross-compile
shell: bash
run: set-cross-compile.sh ${{ inputs.target }}
run: set-cross-compile.py ${{ inputs.target }}
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with: