From 0f2c42a57af7b860798bf9f67d383518eac4dc63 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 1 Oct 2026 06:39:31 +0200 Subject: [PATCH] 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. --- ci/build-libmpv-macos.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/build-libmpv-macos.sh b/ci/build-libmpv-macos.sh index da8e4cd..fea0c9b 100644 --- a/ci/build-libmpv-macos.sh +++ b/ci/build-libmpv-macos.sh @@ -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}