mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-12 19:50:17 +00:00
Fix build
This commit is contained in:
parent
2dc7fc9491
commit
4baa85633a
@ -2,6 +2,9 @@
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let unsafeFlags = ["-Wno-shorten-64-to-32", "-I/opt/homebrew/opt/clblast/include"]
|
||||
let defines = ["GGML_USE_ACCELERATE", "GGML_USE_CLBLAST"]
|
||||
|
||||
let package = Package(
|
||||
name: "llama",
|
||||
products: [
|
||||
@ -13,7 +16,8 @@ let package = Package(
|
||||
path: ".",
|
||||
sources: ["ggml.c", "llama.cpp", "ggml-opencl.c"],
|
||||
publicHeadersPath: "spm-headers",
|
||||
cSettings: [.unsafeFlags(["-Wno-shorten-64-to-32"]), .define("GGML_USE_ACCELERATE"), .define("GGML_USE_CLBLAST")],
|
||||
cSettings: [.unsafeFlags(unsafeFlags)] + defines.map { .define($0) },
|
||||
cxxSettings: [.unsafeFlags(unsafeFlags)] + defines.map { .define($0) },
|
||||
linkerSettings: [.linkedFramework("Accelerate"), .linkedFramework("OpenCL")]
|
||||
),
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user