Skip to content

Commit e90cb52

Browse files
Frank Guoclaude
andcommitted
fix: make ggml-metal and ggml-blas CGO flags darwin-only
These libraries only exist on macOS. Linking them unconditionally causes build failures on Linux. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c6aba06 commit e90cb52

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/rekal/cli/nomic/nomic_cgo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ package nomic
66
#cgo CFLAGS: -I${SRCDIR}/../../../../.deps/llama.cpp/include -I${SRCDIR}/../../../../.deps/llama.cpp/ggml/include
77
#cgo LDFLAGS: -L${SRCDIR}/../../../../.deps/llama.cpp/build/src -lllama
88
#cgo LDFLAGS: -L${SRCDIR}/../../../../.deps/llama.cpp/build/ggml/src -lggml -lggml-base -lggml-cpu
9-
#cgo LDFLAGS: -L${SRCDIR}/../../../../.deps/llama.cpp/build/ggml/src/ggml-metal -lggml-metal
10-
#cgo LDFLAGS: -L${SRCDIR}/../../../../.deps/llama.cpp/build/ggml/src/ggml-blas -lggml-blas
119
#cgo LDFLAGS: -L${SRCDIR}/../../../../.deps/llama.cpp/build/common -lcommon
1210
#cgo LDFLAGS: -lstdc++ -lm
11+
#cgo darwin LDFLAGS: -L${SRCDIR}/../../../../.deps/llama.cpp/build/ggml/src/ggml-metal -lggml-metal
12+
#cgo darwin LDFLAGS: -L${SRCDIR}/../../../../.deps/llama.cpp/build/ggml/src/ggml-blas -lggml-blas
1313
#cgo darwin LDFLAGS: -framework Foundation -framework Metal -framework MetalKit -framework Accelerate
1414
#include "embed.h"
1515
#include <stdlib.h>

0 commit comments

Comments
 (0)