build: pass explicit --arch to ffmpeg for the x86_64 cross-slice

ffmpeg auto-detects the CPU architecture from uname -m, which is
aarch64 on the macOS runner, and then compiles Arm assembly for the
x86_64 slice. Pass --arch explicitly so the cross build uses the
correct SIMD code paths.
This commit is contained in:
david
2026-10-01 06:39:31 +02:00
parent c92a9ef033
commit 0f2c42a57a
+3
View File
@@ -160,8 +160,11 @@ _lcms2_mark=lib/liblcms2.a
_ffmpeg () {
gitpin https://github.com/FFmpeg/FFmpeg.git ffmpeg "$FFMPEG_VER"
builddir ffmpeg
# --arch is explicit: ffmpeg would otherwise auto-detect aarch64 from
# uname -m on the runner even for the cross-compiled x86_64 slice.
args=(
--prefix="$prefix_dir" --pkg-config=pkg-config --target-os=darwin
--arch="$ARCH"
--enable-gpl $commonflags
--cc="$CC" --cxx="$CXX"
--disable-{doc,programs}