Skip to content

Commit e262893

Browse files
committed
Support shared ggml library
1 parent ef3a87b commit e262893

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

llama-cpp-2/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ sampler = []
3232
# Only has an impact on Android.
3333
android-shared-stdcxx = ["llama-cpp-sys-2/shared-stdcxx"]
3434
mtmd = ["llama-cpp-sys-2/mtmd"]
35+
shared-ggml = ["llama-cpp-sys-2/shared-ggml"]
3536

3637

3738
[target.'cfg(all(target_os = "macos", any(target_arch = "aarch64", target_arch = "arm64")))'.dependencies]

llama-cpp-sys-2/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,5 @@ native = []
8080
openmp = []
8181
# Only has an impact on Android.
8282
shared-stdcxx = []
83+
shared-ggml = []
8384
mtmd = []

llama-cpp-sys-2/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,10 @@ fn main() {
686686
config.define("GGML_OPENMP", "OFF");
687687
}
688688

689+
if cfg!(feature = "shared-ggml") {
690+
config.define("LLAMA_USE_SYSTEM_GGML", "ON");
691+
}
692+
689693
// General
690694
config
691695
.profile(&profile)

0 commit comments

Comments
 (0)