1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:57:36 +00:00

AK: Always use our assertion failure method, and add backtrace to it

On platforms that support it, enable using ``<execinfo.h>`` to get
backtrace(3) to dump a backtrace on assertion failure. This should make
debugging things like WebContent crashes in Lagom much easier.
This commit is contained in:
Andrew Kaster 2023-08-30 16:54:33 +02:00 committed by Andrew Kaster
parent 3056ff6b11
commit 4641af7873
3 changed files with 65 additions and 10 deletions

View file

@ -331,6 +331,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
# Solaris has socket and networking related functions in two extra libraries
target_link_libraries(LibCore PRIVATE nsl socket)
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "BSD$")
# BSD Platforms have backtrace(3) in a separate library
target_link_libraries(LibCore PRIVATE execinfo)
endif()
target_sources(LibCore PRIVATE ${AK_SOURCES})
# LibMain