mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Robust shared build
This commit is contained in:
parent
091ec9632c
commit
9152a832c4
@ -150,6 +150,7 @@ endif ()
|
|||||||
if (LINKER_NAME)
|
if (LINKER_NAME)
|
||||||
message(STATUS "Using linker: ${LINKER_NAME} (selected from: LLD_PATH=${LLD_PATH}; GOLD_PATH=${GOLD_PATH}; COMPILER_POSTFIX=${COMPILER_POSTFIX})")
|
message(STATUS "Using linker: ${LINKER_NAME} (selected from: LLD_PATH=${LLD_PATH}; GOLD_PATH=${GOLD_PATH}; COMPILER_POSTFIX=${COMPILER_POSTFIX})")
|
||||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=${LINKER_NAME}")
|
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=${LINKER_NAME}")
|
||||||
|
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=${LINKER_NAME}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Make sure the final executable has symbols exported
|
# Make sure the final executable has symbols exported
|
||||||
@ -229,7 +230,8 @@ endif ()
|
|||||||
|
|
||||||
# Make this extra-checks for correct library dependencies.
|
# Make this extra-checks for correct library dependencies.
|
||||||
if (NOT SANITIZE)
|
if (NOT SANITIZE)
|
||||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
|
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
|
||||||
|
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
include(cmake/dbms_glob_sources.cmake)
|
include(cmake/dbms_glob_sources.cmake)
|
||||||
|
@ -151,6 +151,7 @@ macro(add_object_library name common_path)
|
|||||||
add_glob(${name}_headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${common_path}/*.h)
|
add_glob(${name}_headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${common_path}/*.h)
|
||||||
add_glob(${name}_sources ${common_path}/*.cpp ${common_path}/*.c ${common_path}/*.h)
|
add_glob(${name}_sources ${common_path}/*.cpp ${common_path}/*.c ${common_path}/*.h)
|
||||||
add_library(${name} SHARED ${${name}_sources} ${${name}_headers})
|
add_library(${name} SHARED ${${name}_sources} ${${name}_headers})
|
||||||
|
target_link_libraries (${name} PRIVATE -Wl,--unresolved-symbols=ignore-all)
|
||||||
endif ()
|
endif ()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user