Files
filmcraft/packaging
Dylan M. Taylor 8d925e9df3 Honor CARGO_BUILD_TARGET in FreeBSD packaging for aarch64 release builds (#3534)
* Honor CARGO_BUILD_TARGET in FreeBSD packaging for aarch64 release builds

The release workflow cross-compiles FreeBSD aarch64 in an x86_64 VM and sets
CARGO_BUILD_TARGET. package.sh took the arch from uname -m, so it built the
aarch64 binaries into target/release and named the archive for the host (x86_64),
and it ran the aarch64 binary to print --version, which the x86_64 host cannot run.

When CARGO_BUILD_TARGET is set, build with --target, read binaries from
target/<triple>/release, name the archive by the target's arch, and skip the
--version check when the binary is not native. Unset behavior is unchanged.

* Reject unsupported CARGO_BUILD_TARGET in FreeBSD packaging

Any target other than aarch64-unknown-freebsd was labelled x86_64, so an
i686 build would produce an x86_64-named archive of i686 binaries. Only
x86_64 and aarch64 targets are accepted now; others exit 2 before the build.
2026-10-28 15:48:39 -04:00
..