guusw Giovanni Petrantoni commited on
Commit
ecb4322
·
1 Parent(s): ec77b2c

Fix visionOS build and add CI (llama/12415)

Browse files

* 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 <[email protected]>

Files changed (1) hide show
  1. ggml/src/CMakeLists.txt +4 -0
ggml/src/CMakeLists.txt CHANGED
@@ -325,6 +325,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "Android")
325
  target_link_libraries(ggml-base PRIVATE dl)
326
  endif()
327
 
 
 
 
 
328
  if (BUILD_SHARED_LIBS)
329
  foreach (target ggml-base ggml)
330
  set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)
 
325
  target_link_libraries(ggml-base PRIVATE dl)
326
  endif()
327
 
328
+ if(CMAKE_SYSTEM_NAME MATCHES "visionOS")
329
+ target_compile_definitions(ggml-base PUBLIC _DARWIN_C_SOURCE)
330
+ endif()
331
+
332
  if (BUILD_SHARED_LIBS)
333
  foreach (target ggml-base ggml)
334
  set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)