mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
AK: Propagate -U flag to dependencies when built as a static library
We added a weak symbol to AK to support overriding the default assertion handler for test cases. However, on macOS, we need to explicitly mark the possibly-null symbol as 'it's ok for this to be undefined'. When AK is a shared library, the flag can be applied to the link step of the dylib, but when it's a static library, we need to apply it to the executable that links against it.
This commit is contained in:
parent
656586a0e5
commit
564f5ca2cc
Notes:
github-actions[bot]
2025-05-16 21:00:38 +00:00
Author: https://github.com/ADKaster
Commit: 564f5ca2cc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4785
1 changed files with 5 additions and 1 deletions
|
@ -74,5 +74,9 @@ if (WIN32)
|
|||
target_link_libraries(AK PRIVATE clang_rt.builtins-x86_64.lib)
|
||||
target_link_libraries(AK PRIVATE Bcrypt.lib)
|
||||
elseif (APPLE)
|
||||
target_link_options(AK PRIVATE LINKER:-U,_ak_assertion_handler)
|
||||
set(ASSERTION_HANDLER_VISIBILITY PRIVATE)
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
set(ASSERTION_HANDLER_VISIBILITY INTERFACE)
|
||||
endif()
|
||||
target_link_options(AK ${ASSERTION_HANDLER_VISIBILITY} LINKER:-U,_ak_assertion_handler)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue