ggml: Change default visibility of symbols to hidden (#30014)
See discussion in #29997. This prevents a handful of internal symbols leaking via GGML_API.
This commit is contained in:
1 parent
b2f036c0f1
commit
a05e58c981
1 file changed
+5
-1
@@ -637,7 +637,11 @@ endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
foreach (target ggml-base ggml)
|
||||
set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set_target_properties(${target} PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
C_VISIBILITY_PRESET hidden
|
||||
CXX_VISIBILITY_PRESET hidden
|
||||
)
|
||||
target_compile_definitions(${target} PRIVATE GGML_BUILD)
|
||||
target_compile_definitions(${target} PUBLIC GGML_SHARED)
|
||||
endforeach()
|
||||
|
||||
Reference in new issue
Block a user