Disable libavif on x86_64 simulators.

This commit is contained in:
Russell Keith-Magee 2025-08-01 12:30:57 +08:00
parent fe1ca68403
commit cd4c416d4c
No known key found for this signature in database
GPG Key ID: 3D2DAB6A37BB5BC3
2 changed files with 10 additions and 1 deletions

View File

@ -286,7 +286,12 @@ function build {
build_tiff build_tiff
fi fi
build_libavif if [[ -z "$IOS_SDK" ]] || [[ "$PLAT" == "arm64" ]]; then
# Building libavif for x86_64 iOS simulator isn't currently possible
# because it requires the use of nasm, which doesn't create
# iOS-compatible binaries.
build_libavif
fi
build_libpng build_libpng
build_lcms2 build_lcms2
build_openjpeg build_openjpeg

View File

@ -27,6 +27,10 @@ def test_wheel_modules() -> None:
# tkinter is not available on iOS # tkinter is not available on iOS
expected_modules.remove("tkinter") expected_modules.remove("tkinter")
# libavif is not available on x86_64 iOS simulators
if platform.machine() == "x86_64":
expected_modules.remove("avif")
assert set(features.get_supported_modules()) == expected_modules assert set(features.get_supported_modules()) == expected_modules