1
0
Fork 0

Use --push-state/--pop-state linker options

This commit is contained in:
Ilya Fedin 2021-12-30 08:30:28 +04:00 committed by John Preston
parent ed7cf04191
commit f2384057de
2 changed files with 5 additions and 5 deletions

View file

@ -18,10 +18,10 @@ if (DESKTOP_APP_USE_PACKAGED)
if (JEMALLOC_FOUND) if (JEMALLOC_FOUND)
target_link_libraries(external_jemalloc target_link_libraries(external_jemalloc
INTERFACE INTERFACE
-Wl,--no-as-needed -Wl,--push-state,--no-as-needed
PkgConfig::JEMALLOC PkgConfig::JEMALLOC
${JEMALLOC_LINK_LIBRARIES} ${JEMALLOC_LINK_LIBRARIES}
-Wl,--as-needed -Wl,--pop-state
) )
return() return()
endif() endif()
@ -61,8 +61,8 @@ add_dependencies(external_jemalloc_bundled jemalloc-build)
target_link_libraries(external_jemalloc target_link_libraries(external_jemalloc
INTERFACE INTERFACE
-Wl,--whole-archive -Wl,--push-state,--whole-archive
$<TARGET_FILE:external_jemalloc_bundled> $<TARGET_FILE:external_jemalloc_bundled>
-Wl,--no-whole-archive -Wl,--pop-state
external_jemalloc_bundled external_jemalloc_bundled
) )

View file

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