1
0
Fork 0

Adjust --as-needed for allocation tracer and jemalloc

This commit is contained in:
Ilya Fedin 2021-09-12 01:46:54 +04:00 committed by John Preston
parent 03fad319f5
commit 7ca99a4d08
2 changed files with 8 additions and 2 deletions

View file

@ -12,7 +12,13 @@ if (DESKTOP_APP_USE_PACKAGED)
pkg_check_modules(JEMALLOC IMPORTED_TARGET jemalloc)
if (JEMALLOC_FOUND)
target_link_libraries(external_jemalloc INTERFACE PkgConfig::JEMALLOC)
target_link_libraries(external_jemalloc
INTERFACE
-Wl,--no-as-needed
PkgConfig::JEMALLOC
${JEMALLOC_LINK_LIBRARIES}
-Wl,--as-needed
)
endif()
endif()

View file

@ -64,7 +64,7 @@ if (DESKTOP_APP_USE_ALLOCATION_TRACER)
-Wl,-wrap,aligned_alloc
-Wl,-wrap,posix_memalign
-Wl,-wrap,free
-Wl,--no-as-needed,-lrt
-Wl,--no-as-needed,-lrt,--as-needed
)
target_link_libraries(common_options
INTERFACE