From 1cf679dec4eca99aeaed4fe09a8092803bdecfc1 Mon Sep 17 00:00:00 2001 From: trixirt Date: Mon, 22 Jan 2024 05:02:35 -0800 Subject: [PATCH] cmake : make libwhisper.so position independent (#1792) This is similar to how libllama.so is built. Signed-off-by: Tom Rix --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bab6e7ecf..4c620f512 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -505,6 +505,7 @@ else() endif() if (BUILD_SHARED_LIBS) + set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON) target_link_libraries(${TARGET} PUBLIC ${CMAKE_DL_LIBS} )