Skip to content

Commit 6300eef

Browse files
committed
revert commit ec505d7: instead, use the right options in LLAMA env var for both make and make test
Eliminates the inclusion of libggml-blas.a and its linker flag from the macOS build configuration in the Makefile. This streamlines the build process and avoids unnecessary dependencies for macOS targets. Usage example: export the following env var to use them both for make and make test: LLAMA="-DGGML_NATIVE=OFF -DGGML_METAL=ON -DGGML_ACCELERATE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=Apple" WHISPER="-DWHISPER_COREML=ON -DWHISPER_COREML_ALLOW_FALLBACK=ON" SQLITE3=/opt/homebrew/Cellar/sqlite/3.50.4/bin/sqlite3
1 parent 2fb8761 commit 6300eef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ ifeq ($(PLATFORM),windows)
7272
else ifeq ($(PLATFORM),macos)
7373
TARGET := $(DIST_DIR)/ai.dylib
7474
LLAMA_LIBS += $(BUILD_GGML)/lib/libggml-metal.a
75-
LLAMA_LIBS += $(BUILD_GGML)/lib/libggml-blas.a
7675
ifndef ARCH
7776
LDFLAGS += -arch x86_64 -arch arm64
7877
CFLAGS += -arch x86_64 -arch arm64
@@ -86,7 +85,7 @@ else ifeq ($(PLATFORM),macos)
8685
WHISPER_OPTIONS += -DGGML_OPENMP=OFF -DCMAKE_OSX_ARCHITECTURES="$(ARCH)" -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
8786
MINIAUDIO_OPTIONS += -DCMAKE_OSX_ARCHITECTURES="$(ARCH)" -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
8887
endif
89-
LDFLAGS += -L./$(BUILD_GGML)/lib -lggml-metal -L./$(BUILD_GGML)/lib -lggml-blas -framework Metal -framework Foundation -framework CoreFoundation -framework QuartzCore -dynamiclib -undefined dynamic_lookup -headerpad_max_install_names
88+
LDFLAGS += -L./$(BUILD_GGML)/lib -lggml-metal -L./$(BUILD_GGML)/lib -framework Metal -framework Foundation -framework CoreFoundation -framework QuartzCore -dynamiclib -undefined dynamic_lookup -headerpad_max_install_names
9089
STRIP = strip -x -S $@
9190
else ifeq ($(PLATFORM),android)
9291
ifndef ARCH # Set ARCH to find Android NDK's Clang compiler, the user should set the ARCH

0 commit comments

Comments
 (0)