Skip to content

Commit 49fe10c

Browse files
committed
fix(makefile): missing BLAS linux linker flags
1 parent 0668bb6 commit 49fe10c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,15 @@ endif
144144
ifneq (,$(findstring BLAS,$(LLAMA)))
145145
LLAMA_LIBS += $(BUILD_LLAMA)/ggml/src/ggml-blas/libggml-blas.a
146146
LLAMA_LDFLAGS += -L./$(BUILD_LLAMA)/ggml/src/ggml-blas -lggml-blas
147+
# Link against specific BLAS implementations
148+
ifneq (,$(findstring OpenBLAS,$(LLAMA)))
149+
LLAMA_LDFLAGS += -lopenblas
150+
else ifneq (,$(findstring Apple,$(LLAMA)))
151+
# Apple Accelerate is already linked in macOS section
152+
else
153+
# Generic BLAS
154+
LLAMA_LDFLAGS += -lblas
155+
endif
147156
endif
148157
ifneq (,$(findstring COREML,$(WHISPER))) # CoreML - only macos
149158
WHISPER_LIBS += $(BUILD_WHISPER)/src/libwhisper.coreml.a

0 commit comments

Comments
 (0)