Update building for Android (llama/9672)

* docs : clarify building Android on Termux

* docs : update building Android on Termux

* docs : add cross-compiling for Android

* cmake : link dl explicitly for Android
This commit is contained in:
Andrew Minh Nguyen 2024-10-07 09:37:31 -07:00 committed by Georgi Gerganov
parent 315364d7de
commit bd7ace7adc

View File

@ -1361,6 +1361,10 @@ if (MATH_LIBRARY)
endif()
endif()
if (CMAKE_SYSTEM_NAME MATCHES "Android")
list(APPEND GGML_EXTRA_LIBS_PRIVATE dl) # Must be linked explicitly
endif()
list(REMOVE_DUPLICATES GGML_EXTRA_LIBS_PRIVATE)
list(REMOVE_DUPLICATES GGML_EXTRA_LIBS_PUBLIC)
target_link_libraries(ggml PRIVATE ${GGML_EXTRA_LIBS_PRIVATE} PUBLIC ${GGML_EXTRA_LIBS_PUBLIC})