From 1a27c2cc3e845940ac858605bb308ae3b02c78cc Mon Sep 17 00:00:00 2001 From: Frankie Dintino Date: Fri, 5 Jul 2024 15:18:22 -0400 Subject: [PATCH] Only build SVT-AV1 for apple silicon if macOS >= 14 --- wheelbuild/config.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wheelbuild/config.sh b/wheelbuild/config.sh index e1206ab..fdb8eff 100644 --- a/wheelbuild/config.sh +++ b/wheelbuild/config.sh @@ -227,7 +227,13 @@ function build_libavif { fi which cmake cmake --version - if [ "$MB_ML_VER" != "1" ]; then + if [ -n "$IS_MACOS" ] && [ "$PLAT" == "arm64" ]; then + # SVT-AV1 NEON intrinsics require macOS 14 + local macos_ver==$(sw_vers --productVersion | sed 's/\.[0-9]*//') + if [ "$macos_ver" -gt "13" ]; then + LIBAVIF_CMAKE_FLAGS+=(-DAVIF_CODEC_SVT=LOCAL) + fi + elif [ "$MB_ML_VER" != "1" ]; then LIBAVIF_CMAKE_FLAGS+=(-DAVIF_CODEC_SVT=LOCAL) fi