Skip to content

Commit 46e9cbf

Browse files
committed
build: fix CI
1 parent 225bdb3 commit 46e9cbf

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/bindings/utils/compileLLamaCpp.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ export async function compileLlamaCpp(buildOptions: BuildOptions, compileOptions
168168
}
169169
}
170170

171+
// workaround for macOS build issues with GGML_BACKEND_DL
172+
if (buildOptions.platform === "mac" && isCmakeValueOn(cmakeCustomOptions.get("GGML_BACKEND_DL")) &&
173+
!cmakeCustomOptions.has("CMAKE_PLATFORM_NO_VERSIONED_SONAME")
174+
)
175+
cmakeCustomOptions.set("CMAKE_PLATFORM_NO_VERSIONED_SONAME", "ON");
176+
171177
await fs.remove(outDirectory);
172178

173179
await spawnCommand(
@@ -688,6 +694,10 @@ function reduceParallelBuildThreads(originalParallelBuildThreads: number) {
688694
return Math.max(1, Math.round(originalParallelBuildThreads / 2));
689695
}
690696

697+
function isCmakeValueOn(value?: string) {
698+
return value === "ON" || value === "1";
699+
}
700+
691701
function isCmakeValueOff(value?: string) {
692702
return value === "OFF" || value === "0";
693703
}

0 commit comments

Comments
 (0)