swift : Package compile breaks due to ggml-metal.metal (#1831)

* Ignore metal file in spm

* Add ggml.h to spm public Headers

---------

Co-authored-by: Vogel Frederik <vogel.frederik@linecorp.com>
This commit is contained in:
Frederik Vogel 2023-06-16 02:47:04 +09:00 committed by GitHub
parent cf267d1c71
commit 69b34a0e80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -11,6 +11,7 @@ let package = Package(
.target(
name: "llama",
path: ".",
exclude: ["ggml-metal.metal"],
sources: ["ggml.c", "llama.cpp"],
publicHeadersPath: "spm-headers",
cSettings: [.unsafeFlags(["-Wno-shorten-64-to-32"]), .define("GGML_USE_ACCELERATE")],

1
spm-headers/ggml.h Symbolic link
View file

@ -0,0 +1 @@
../ggml.h