AK: Only propagate delayload of dbghelp.dll for static builds

When AK is a shared library, the flag should be applied to the link
of the dll. When it's a static library, we need to apply it to the
executable that links against it instead.

Co-Authored-By: ayeteadoe <ayeteadoe@gmail.com>
This commit is contained in:
Andrew Kaster 2025-06-23 12:12:51 -06:00 committed by Jelle Raaijmakers
commit fbf8ffe872
Notes: github-actions[bot] 2025-06-23 21:05:58 +00:00

View file

@ -77,7 +77,11 @@ if (WIN32)
target_link_libraries(AK PRIVATE clang_rt.builtins-x86_64.lib)
target_link_libraries(AK PRIVATE Bcrypt.lib)
target_link_libraries(AK PRIVATE delayimp.lib)
target_link_options(AK INTERFACE /DELAYLOAD:dbghelp.dll)
set(DELAYLOAD_DBGHLP_VISIBILITY PRIVATE)
if (NOT BUILD_SHARED_LIBS)
set(DELAYLOAD_DBGHLP_VISIBILITY INTERFACE)
endif()
target_link_options(AK ${DELAYLOAD_DBGHLP_VISIBILITY} /DELAYLOAD:dbghelp.dll)
elseif (APPLE)
set(ASSERTION_HANDLER_VISIBILITY PRIVATE)
if (NOT BUILD_SHARED_LIBS)