mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibTest: Prevent -dead_strip from removing assertion handler
The ak_assertion_handler symbol is referenced only through a weak symbol in AK/Assertions.cpp. With -dead_strip on macOS, the linker strips the strong definition, breaking EXPECT_DEATH tests which rely on the handler to longjmp back instead of crashing. Add retain and used attributes to prevent the linker from removing it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
Jelle Raaijmakers
parent
972bcdeebe
commit
29355a0e33
Notes:
github-actions[bot]
2026-03-19 17:37:45 +00:00
Author: https://github.com/jdahlin Commit: https://github.com/LadybirdBrowser/ladybird/commit/29355a0e33f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8437 Reviewed-by: https://github.com/gmta ✅
@@ -38,7 +38,7 @@ static void assertion_handler_impl(char const*)
|
||||
#if defined(AK_OS_WINDOWS)
|
||||
# define EXPORT __declspec(dllexport)
|
||||
#else
|
||||
# define EXPORT __attribute__((visibility("default")))
|
||||
# define EXPORT __attribute__((visibility("default"), retain, used))
|
||||
#endif
|
||||
|
||||
extern "C" EXPORT void ak_assertion_handler(char const* message);
|
||||
|
||||
Reference in New Issue
Block a user