mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-29 12:37:08 -06:00
* Honor CARGO_BUILD_TARGET in FreeBSD packaging for aarch64 release builds The shared release workflow cross-compiles FreeBSD aarch64 in the x86_64 VM and sets CARGO_BUILD_TARGET. package.sh ignored it: it built for the host, read binaries from target/release, and took the arch from uname -m (amd64 on that VM), so the aarch64 build would have produced an x86_64 archive with x86_64 binaries. When CARGO_BUILD_TARGET is set, pass --target, read binaries from target/<triple>/release, name the archive from the target arch, and skip the --version smoke test (the binary cannot run on the x86_64 host). Unset keeps the previous behavior. * Reject unsupported CARGO_BUILD_TARGET and gate the smoke test on the host triple Only x86_64-unknown-freebsd and aarch64-unknown-freebsd are accepted when CARGO_BUILD_TARGET is set; anything else exits 2 instead of being labelled freebsd-x86_64. The --version smoke test now runs when CARGO_BUILD_TARGET is unset or equals this host's full FreeBSD triple, so a native explicit target is still checked.