Skip to content

Commit

Permalink
Fix tokudb jemalloc linking
Browse files Browse the repository at this point in the history
Linking tokudb with jemalloc privately causes problems on library
load/unload. To prevent dangling destructor pointers, link with the same
library as the server is using.
  • Loading branch information
cvicentiu committed Sep 20, 2016
1 parent fd0c114 commit 83d5b96
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions storage/tokudb/PerconaFT/portability/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ set(tokuportability_srcs
)

add_library(${LIBTOKUPORTABILITY} SHARED ${tokuportability_srcs})
target_link_libraries(${LIBTOKUPORTABILITY} LINK_PRIVATE ${LIBJEMALLOC})
target_link_libraries(${LIBTOKUPORTABILITY} LINK_PUBLIC ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_SYSTEM_LIBS})

add_library(tokuportability_static_conv STATIC ${tokuportability_srcs})
set_target_properties(tokuportability_static_conv PROPERTIES POSITION_INDEPENDENT_CODE ON)
set(tokuportability_source_libs tokuportability_static_conv ${LIBJEMALLOC} ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_SYSTEM_LIBS})
set(tokuportability_source_libs tokuportability_static_conv ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_SYSTEM_LIBS})
toku_merge_static_libs(${LIBTOKUPORTABILITY}_static ${LIBTOKUPORTABILITY}_static "${tokuportability_source_libs}")

maybe_add_gcov_to_libraries(${LIBTOKUPORTABILITY} tokuportability_static_conv)
Expand Down

0 comments on commit 83d5b96

Please sign in to comment.