Rearrange libraries and build files.
This is the first change in an attempt to arrange the linking so that more errors are detected at link-time. - All files in server/core but for gateway.c are linked to one shared library called maxscale-common. - The files log_manager/log_manager.cc and utils/skygw_utils.cc are built into maxscale-common as well. - MaxScale itself consists now only of gateway.c and is linked with maxscale-common. - All plugins link with maxscale-common. - All executables link in addition with {EMBEDDED_LIB}. After this change, the change (MXS-517) where query_classifier is the only component that uses ${EMBEDDED_LIB} and the rest mysqlclient can be made much cleaner. After a few additional steps, all shared libraries can be linked with the linker flags "-Wl,-z,defs", which directs the linker to resolve all symbols. That will require that all shared libraries list all the libraries they need, but will at the same time ensure that any missing symbols are detected at link-time and not at run-time.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
add_library(readwritesplit SHARED readwritesplit.c)
|
||||
target_link_libraries(readwritesplit ssl pthread log_manager query_classifier)
|
||||
target_link_libraries(readwritesplit maxscale-common query_classifier)
|
||||
set_target_properties(readwritesplit PROPERTIES VERSION "1.0.2")
|
||||
install(TARGETS readwritesplit DESTINATION ${MAXSCALE_LIBDIR})
|
||||
if(BUILD_TESTS)
|
||||
|
Reference in New Issue
Block a user