Skip to content

Commit 1852236

Browse files
committed
[CMake] Hack to fix libass on macOS ARM
1 parent 26acca5 commit 1852236

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmake/modules/FindASS.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ if(NOT TARGET ${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME})
5959
set(DISABLE_ASM "--disable-asm")
6060
endif()
6161

62+
# macOS aarch64 toolchains sometimes fail to assemble libass in the
63+
# ExternalProject. Force a pure-C build here to avoid missing aarch64/*.o
64+
# during libtool archive.
65+
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND ARCH STREQUAL aarch64)
66+
set(DISABLE_ASM "--disable-asm")
67+
endif()
68+
6269
set(CONFIGURE_COMMAND ${AUTORECONF} -vif
6370
COMMAND ./configure
6471
--prefix=${DEPENDS_PATH}

0 commit comments

Comments
 (0)