Skip to content

Commit 14c2635

Browse files
committed
Plugins (Build): Add opt-out option for performing unresolved symbol checks when linking SOs.
1 parent 675f41b commit 14c2635

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

libvisual-plugins/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ CHECK_FUNCTION_EXISTS(mremap HAVE_MREMAP)
7777
# Assembly
7878
#AM_PROG_AS
7979

80+
# Resolve all external symbols when linking SOs.
81+
OPTION(ENABLE_SO_UNRESOLVED_SYMBOL_CHECKS "Enable resolution of external symbols when linking SOs" yes)
82+
8083
# Internationalization
8184
SET(GETTEXT_PACKAGE "libvisual-plugins-${LV_PLUGINS_VERSION_SUFFIX}")
8285
OPTION(ENABLE_NLS "Enable internationalization" yes)

libvisual-plugins/cmake/LVBuildPlugin.cmake

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@ FUNCTION(LV_BUILD_PLUGIN PLUGIN_NAME PLUGIN_TYPE)
5252
${PARSE_ARGS_LINK_OPTIONS}
5353
)
5454

55-
SET_TARGET_PROPERTIES(${SO_NAME} PROPERTIES
56-
LINK_FLAGS -Wl,--unresolved-symbols,ignore-in-shared-libs
57-
)
55+
IF(ENABLE_SO_UNRESOLVED_SYMBOL_CHECKS)
56+
TARGET_LINK_OPTIONS(${SO_NAME}
57+
PRIVATE
58+
-Wl,--unresolved-symbols,ignore-in-shared-libs
59+
)
60+
ENDIF()
5861

5962
TARGET_LINK_LIBRARIES(${SO_NAME}
6063
PRIVATE

0 commit comments

Comments
 (0)