Use --push-state/--pop-state linker options
This commit is contained in:
parent
ed7cf04191
commit
f2384057de
2 changed files with 5 additions and 5 deletions
8
external/jemalloc/CMakeLists.txt
vendored
8
external/jemalloc/CMakeLists.txt
vendored
|
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue