From 96d9bcd5ff8c8f755b7ce0aa01759a4bc968c858 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 12 Feb 2022 11:51:08 +0400 Subject: [PATCH] Don't link linux_jemalloc_helper itself to common_options TARGET_OBJECTS automatically adds target dependnecy, specyfing linux_jemalloc_helper explicitly breaks library ordering due to cycle dependency --- external/jemalloc/CMakeLists.txt | 2 +- options_linux.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/external/jemalloc/CMakeLists.txt b/external/jemalloc/CMakeLists.txt index f89559a..f9d2775 100644 --- a/external/jemalloc/CMakeLists.txt +++ b/external/jemalloc/CMakeLists.txt @@ -55,7 +55,7 @@ INTERFACE target_link_libraries(external_jemalloc INTERFACE - -Wl,--push-state,--whole-archive,${SOURCE_DIR}/lib/libjemalloc_pic.a,--pop-state,-ldl + -Wl,--push-state,--whole-archive,${SOURCE_DIR}/lib/libjemalloc_pic.a,--pop-state ) add_dependencies(external_jemalloc jemalloc-build) diff --git a/options_linux.cmake b/options_linux.cmake index a12feab..9312468 100644 --- a/options_linux.cmake +++ b/options_linux.cmake @@ -64,8 +64,8 @@ endif() target_link_libraries(common_options INTERFACE - desktop-app::linux_jemalloc_helper $ + $ ${CMAKE_DL_LIBS} )