From: Ionoclast Laboratories Date: Fri, 5 May 2023 12:18:21 +0000 (-0400) Subject: Fix for OpenCL / clbast builds on macOS. (#1329) X-Git-Tag: gguf-v0.4.0~795 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=2d13786e91ec9fd28ddf737053822042a824da78;p=pkg%2Fggml%2Fsources%2Fllama.cpp Fix for OpenCL / clbast builds on macOS. (#1329) --- diff --git a/Makefile b/Makefile index 94acefdd..260b2487 100644 --- a/Makefile +++ b/Makefile @@ -121,7 +121,12 @@ ggml-cuda.o: ggml-cuda.cu ggml-cuda.h endif ifdef LLAMA_CLBLAST CFLAGS += -DGGML_USE_CLBLAST - LDFLAGS += -lclblast -lOpenCL + # Mac provides OpenCL as a framework + ifeq ($(UNAME_S),Darwin) + LDFLAGS += -lclblast -framework OpenCL + else + LDFLAGS += -lclblast -lOpenCL + endif OBJS += ggml-opencl.o ggml-opencl.o: ggml-opencl.c ggml-opencl.h $(CC) $(CFLAGS) -c $< -o $@