Skip to content

Commit 9cca757

Browse files
committed
Update Makefile to enable position-independent code for LLAMA and WHISPER on Android platform
1 parent 0fba2d0 commit 9cca757

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ else ifeq ($(PLATFORM),android)
8282
CC = $(BIN)/$(ARCH)-linux-android26-clang
8383
TARGET := $(DIST_DIR)/ai.so
8484
LDFLAGS += -shared
85+
LLAMA_OPTIONS += -DCMAKE_POSITION_INDEPENDENT_CODE=ON
86+
WHISPER_OPTIONS += -DCMAKE_POSITION_INDEPENDENT_CODE=ON
8587
else ifeq ($(PLATFORM),ios)
8688
TARGET := $(DIST_DIR)/ai.dylib
8789
SDK := -isysroot $(shell xcrun --sdk iphoneos --show-sdk-path) -miphoneos-version-min=14.0

0 commit comments

Comments
 (0)