Support native macOS speech relocation and safe indexing
This commit is contained in:
1 parent
9a93ee6375
commit
5b93dd67a7
8 files changed
+287
-14
No files matched your search
@@ -33,6 +33,11 @@ else()
|
||||
set(GGML_METAL OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
if(APPLE AND NOT SEARCHI_INTERNAL_CPU)
|
||||
# Every dylib/backend must resolve beside the installed worker, without the build tree.
|
||||
set(CMAKE_INSTALL_RPATH "@loader_path")
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE AND NOT SEARCHI_INTERNAL_CPU)
|
||||
# The staged worker and every dynamic backend live together. RUNPATH is
|
||||
# non-transitive, so each shared target needs its own relocatable lookup.
|
||||
@@ -51,7 +56,7 @@ if(MSVC)
|
||||
target_compile_options(searchi-speech-worker PRIVATE /utf-8)
|
||||
endif()
|
||||
if(APPLE)
|
||||
set_target_properties(searchi-speech-worker PROPERTIES BUILD_RPATH "$ORIGIN;@loader_path" INSTALL_RPATH "$ORIGIN;@loader_path")
|
||||
set_target_properties(searchi-speech-worker PROPERTIES BUILD_RPATH "@loader_path" INSTALL_RPATH "@loader_path")
|
||||
elseif(UNIX)
|
||||
set_target_properties(searchi-speech-worker PROPERTIES BUILD_RPATH "$ORIGIN" INSTALL_RPATH "$ORIGIN")
|
||||
endif()
|
||||
Reference in new issue
Block a user