1
0
Fork 0

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
This commit is contained in:
Ilya Fedin 2022-02-12 11:51:08 +04:00 committed by John Preston
parent 6be4c5d41d
commit 96d9bcd5ff
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -64,8 +64,8 @@ endif()
target_link_libraries(common_options
INTERFACE
desktop-app::linux_jemalloc_helper
$<TARGET_OBJECTS:desktop-app::linux_jemalloc_helper>
$<LINK_ONLY:desktop-app::external_jemalloc>
${CMAKE_DL_LIBS}
)