File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,9 @@ ifeq ($(PLATFORM),windows)
5656else ifeq ($(PLATFORM),macos)
5757 TARGET := $(DIST_DIR ) /ai.dylib
5858 LIBS += $(BUILD_DIR ) /lib/ggml/src/ggml-metal/libggml-metal.a
59- LDFLAGS += -L./$(BUILD_DIR ) /lib/ggml/src/ggml-metal -lggml-metal -framework Metal -framework Foundation -framework CoreFoundation -framework QuartzCore -framework Accelerate -dynamiclib -undefined dynamic_lookup
60- # LDFLAGS += -arch x86_64 -arch arm64 -L./$(BUILD_DIR)/lib/ggml/src/ggml-metal -lggml-metal
61- # CFLAGS + = -arch x86_64 -arch arm64
59+ LDFLAGS += -arch x86_64 -arch arm64 - L./$(BUILD_DIR ) /lib/ggml/src/ggml-metal -lggml-metal -framework Metal -framework Foundation -framework CoreFoundation -framework QuartzCore -framework Accelerate -dynamiclib -undefined dynamic_lookup
60+ CFLAGS += -arch x86_64 -arch arm64
61+ LLAMA_OPTIONS = -DCMAKE_OSX_ARCHITECTURES=" x86_64; arm64"
6262else ifeq ($(PLATFORM),android)
6363 # Set ARCH to find Android NDK's Clang compiler, the user should set the ARCH
6464 ifeq ($(filter %,$(ARCH)),)
@@ -127,9 +127,8 @@ test: $(TARGET)
127127
128128# Build all libraries at once using one CMake call
129129build/libs.stamp :
130- # -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
131130 cd $(BUILD_DIR ) && \
132- cmake -B lib -DBUILD_SHARED_LIBS=OFF ../$(LLAMA_DIR ) && \
131+ cmake -B lib -DBUILD_SHARED_LIBS=OFF $( LLAMA_OPTIONS ) ../$(LLAMA_DIR ) && \
133132 cmake --build lib --config Release -- -j$(CPUS )
134133 touch $@
135134
You can’t perform that action at this time.
0 commit comments