mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
On Linux, support -Wl,--no-undefined (only client shared library)
and --Wl,--as-needed (all shared modules). The later will remove unused dependencies (also from gcc and C++ runtime)
This commit is contained in:
@ -167,7 +167,14 @@ IF(NOT DISABLE_SHARED)
|
||||
OUTPUT_NAME mysqlclient
|
||||
VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0"
|
||||
SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
|
||||
|
||||
IF(LINK_FLAG_NO_UNDEFINED)
|
||||
GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS)
|
||||
IF(NOT libmysql_link_flag)
|
||||
SET(libmysql_link_flags)
|
||||
ENDIF()
|
||||
SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS
|
||||
"${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}")
|
||||
ENDIF()
|
||||
# clean direct output needs to be set several targets have the same name
|
||||
#(mysqlclient in this case)
|
||||
SET_TARGET_PROPERTIES(mysqlclient PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
|
Reference in New Issue
Block a user