From f2384057de92bc6e40fcb21b3b9329119058e8b2 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 30 Dec 2021 08:30:28 +0400 Subject: [PATCH] Use --push-state/--pop-state linker options --- external/jemalloc/CMakeLists.txt | 8 ++++---- options_linux.cmake | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/external/jemalloc/CMakeLists.txt b/external/jemalloc/CMakeLists.txt index 13227f5..72537cd 100644 --- a/external/jemalloc/CMakeLists.txt +++ b/external/jemalloc/CMakeLists.txt @@ -18,10 +18,10 @@ if (DESKTOP_APP_USE_PACKAGED) if (JEMALLOC_FOUND) target_link_libraries(external_jemalloc INTERFACE - -Wl,--no-as-needed + -Wl,--push-state,--no-as-needed PkgConfig::JEMALLOC ${JEMALLOC_LINK_LIBRARIES} - -Wl,--as-needed + -Wl,--pop-state ) return() endif() @@ -61,8 +61,8 @@ add_dependencies(external_jemalloc_bundled jemalloc-build) target_link_libraries(external_jemalloc INTERFACE - -Wl,--whole-archive + -Wl,--push-state,--whole-archive $ - -Wl,--no-whole-archive + -Wl,--pop-state external_jemalloc_bundled ) diff --git a/options_linux.cmake b/options_linux.cmake index 9b39c06..241ce37 100644 --- a/options_linux.cmake +++ b/options_linux.cmake @@ -80,7 +80,7 @@ if (DESKTOP_APP_USE_ALLOCATION_TRACER) -Wl,-wrap,aligned_alloc -Wl,-wrap,posix_memalign -Wl,-wrap,free - -Wl,--no-as-needed,-lrt,--as-needed + -Wl,--push-state,--no-as-needed,-lrt,--pop-state ) target_link_libraries(common_options INTERFACE