cmake: look for rdynamic instead of hardcoding it (#699)
This commit is contained in:
committed by
GitHub
parent
564c88b07c
commit
d6ad197d3c
@@ -296,8 +296,8 @@ endif()
|
||||
if(MSVC)
|
||||
target_compile_definitions(snmalloc INTERFACE -D_HAS_EXCEPTIONS=0)
|
||||
else()
|
||||
# All symbols are always dynamic on haiku and -rdynamic is redundant (and unsupported).
|
||||
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Haiku")
|
||||
check_linker_flag(CXX "-rdynamic" SNMALLOC_LINKER_SUPPORT_RDYNAMIC)
|
||||
if (SNMALLOC_LINKER_SUPPORT_RDYNAMIC)
|
||||
# Get better stack traces in CI and debug builds.
|
||||
target_link_options(snmalloc INTERFACE $<${ci_or_debug}:-rdynamic>)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user