File tree 3 files changed +37
-4
lines changed
3 files changed +37
-4
lines changed Original file line number Diff line number Diff line change @@ -676,6 +676,35 @@ jobs:
676
676
-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
677
677
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
678
678
679
+ macOS-latest-cmake-visionos :
680
+ runs-on : macos-latest
681
+
682
+ steps :
683
+ - name : Clone
684
+ id : checkout
685
+ uses : actions/checkout@v4
686
+
687
+ - name : Dependencies
688
+ id : depends
689
+ continue-on-error : true
690
+ run : |
691
+ brew update
692
+
693
+ - name : Build
694
+ id : cmake_build
695
+ run : |
696
+ sysctl -a
697
+ cmake -B build -G Xcode \
698
+ -DGGML_METAL_USE_BF16=ON \
699
+ -DGGML_METAL_EMBED_LIBRARY=ON \
700
+ -DLLAMA_BUILD_EXAMPLES=OFF \
701
+ -DLLAMA_BUILD_TESTS=OFF \
702
+ -DLLAMA_BUILD_SERVER=OFF \
703
+ -DCMAKE_SYSTEM_NAME=visionOS \
704
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=1.0 \
705
+ -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
706
+ cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
707
+
679
708
macOS-latest-swift :
680
709
runs-on : macos-latest
681
710
Original file line number Diff line number Diff line change @@ -432,8 +432,8 @@ cmake -B build-visionos -G Xcode \
432
432
-DCMAKE_SYSTEM_NAME=visionOS \
433
433
-DCMAKE_OSX_SYSROOT=xros \
434
434
-DCMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS=xros \
435
- -DCMAKE_C_FLAGS=" -D_XOPEN_SOURCE=700 -Du_int=unsigned\ int -Du_char=unsigned\ char -Du_short=unsigned\ short ${COMMON_C_FLAGS} " \
436
- -DCMAKE_CXX_FLAGS=" -D_XOPEN_SOURCE=700 -Du_int=unsigned\ int -Du_char=unsigned\ char -Du_short=unsigned\ short ${COMMON_CXX_FLAGS} " \
435
+ -DCMAKE_C_FLAGS=" -D_XOPEN_SOURCE=700 ${COMMON_C_FLAGS} " \
436
+ -DCMAKE_CXX_FLAGS=" -D_XOPEN_SOURCE=700 ${COMMON_CXX_FLAGS} " \
437
437
-S .
438
438
cmake --build build-visionos --config Release -- -quiet
439
439
@@ -445,8 +445,8 @@ cmake -B build-visionos-sim -G Xcode \
445
445
-DCMAKE_SYSTEM_NAME=visionOS \
446
446
-DCMAKE_OSX_SYSROOT=xrsimulator \
447
447
-DCMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS=xrsimulator \
448
- -DCMAKE_C_FLAGS=" -D_XOPEN_SOURCE=700 -Du_int=unsigned\ int -Du_char=unsigned\ char -Du_short=unsigned\ short ${COMMON_C_FLAGS} " \
449
- -DCMAKE_CXX_FLAGS=" -D_XOPEN_SOURCE=700 -Du_int=unsigned\ int -Du_char=unsigned\ char -Du_short=unsigned\ short ${COMMON_CXX_FLAGS} " \
448
+ -DCMAKE_C_FLAGS=" -D_XOPEN_SOURCE=700 ${COMMON_C_FLAGS} " \
449
+ -DCMAKE_CXX_FLAGS=" -D_XOPEN_SOURCE=700 ${COMMON_CXX_FLAGS} " \
450
450
-S .
451
451
cmake --build build-visionos-sim --config Release -- -quiet
452
452
Original file line number Diff line number Diff line change @@ -325,6 +325,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "Android")
325
325
target_link_libraries (ggml-base PRIVATE dl)
326
326
endif ()
327
327
328
+ if (CMAKE_SYSTEM_NAME MATCHES "visionOS" )
329
+ target_compile_definitions (ggml-base PUBLIC _DARWIN_C_SOURCE)
330
+ endif ()
331
+
328
332
if (BUILD_SHARED_LIBS )
329
333
foreach (target ggml-base ggml)
330
334
set_target_properties (${target} PROPERTIES POSITION_INDEPENDENT_CODE ON )
You can’t perform that action at this time.
0 commit comments