From: Guus Waals Date: Wed, 19 Mar 2025 10:15:23 +0000 (+0000) Subject: Fix visionOS build and add CI (llama/12415) X-Git-Tag: upstream/1.7.5~70 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=c722ff84d33a2afce06a39e412ea6d70159586dc;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp Fix visionOS build and add CI (llama/12415) * ci: add visionOS build workflow Add a new GitHub Actions workflow for building on visionOS with CMake and Xcode. * ggml: Define _DARWIN_C_SOURCE for visionOS to fix missing u_xxx typedefs * ci: remove define hacks for u_xxx system types --------- Co-authored-by: Giovanni Petrantoni --- diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index a797e2b1..c1c74986 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -325,6 +325,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "Android") target_link_libraries(ggml-base PRIVATE dl) endif() +if(CMAKE_SYSTEM_NAME MATCHES "visionOS") + target_compile_definitions(ggml-base PUBLIC _DARWIN_C_SOURCE) +endif() + if (BUILD_SHARED_LIBS) foreach (target ggml-base ggml) set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)