Always dynamically load the llm server library

This switches darwin to dynamic loading, and refactors the code now that no
static linking of the library is used on any platform
This commit is contained in:
Daniel Hiltgen
2024-01-09 20:29:58 -08:00
parent d88c527be3
commit 39928a42e8
23 changed files with 290 additions and 463 deletions

View File

@@ -29,4 +29,16 @@ git_module_setup
apply_patches
build
install
gcc -fPIC -g -shared -o ${BUILD_DIR}/lib/libext_server.so \
-Wl,-force_load ${BUILD_DIR}/lib/libext_server.a \
${BUILD_DIR}/lib/libcommon.a \
${BUILD_DIR}/lib/libllama.a \
${BUILD_DIR}/lib/libggml_static.a \
-lpthread -ldl -lm -lc++ \
-framework Accelerate \
-framework Foundation \
-framework Metal \
-framework MetalKit \
-framework MetalPerformanceShaders
cleanup