Skip to content

Commit 1eee0f9

Browse files
committed
build: give BlocksRuntime hidden visibility
Since BlocksRuntime is currently built statically, we should ensure that it does not leak symbols into the target library or executable it is being linked into. This will require consumers to explicitly link against the BlocksRuntime.
1 parent 6162a1d commit 1eee0f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ if(NOT BlocksRuntime_FOUND)
142142
${PROJECT_SOURCE_DIR}/src/BlocksRuntime/runtime.c)
143143
set_target_properties(BlocksRuntime
144144
PROPERTIES
145-
POSITION_INDEPENDENT_CODE TRUE)
145+
POSITION_INDEPENDENT_CODE TRUE
146+
C_VISIBILITY_PRESET HIDDEN
147+
VISIBILITY_INLINES_HIDDEN YES)
146148
if(HAVE_OBJC AND CMAKE_DL_LIBS)
147149
set_target_properties(BlocksRuntime
148150
PROPERTIES

0 commit comments

Comments
 (0)