Skip to content

Commit 7cf2b93

Browse files
committed
fix: adapt to llama.cpp breaking changes
1 parent 59a5134 commit 7cf2b93

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bindings/utils/compileLLamaCpp.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,14 @@ export async function compileLlamaCpp(buildOptions: BuildOptions, compileOptions
131131
if (!cmakeCustomOptions.has("GGML_CCACHE"))
132132
cmakeCustomOptions.set("GGML_CCACHE", "OFF");
133133

134-
if (!cmakeCustomOptions.has("LLAMA_CURL"))
134+
if (!cmakeCustomOptions.has("LLAMA_CURL") || isCmakeValueOff(cmakeCustomOptions.get("LLAMA_CURL"))) {
135135
cmakeCustomOptions.set("LLAMA_CURL", "OFF");
136136

137+
// avoid linking to extra libraries that we don't use
138+
if (!cmakeCustomOptions.has("LLAMA_OPENSSL"))
139+
cmakeCustomOptions.set("LLAMA_OPENSSL", "OFF");
140+
}
141+
137142
if (buildOptions.platform === "win" && buildOptions.arch === "arm64" && !cmakeCustomOptions.has("GGML_OPENMP"))
138143
cmakeCustomOptions.set("GGML_OPENMP", "OFF");
139144

0 commit comments

Comments
 (0)