From 70d9edfec86ba53c100d7533533593c47901ff45 Mon Sep 17 00:00:00 2001 From: Fabrice de Gans Date: Fri, 14 Nov 2025 12:34:33 -0500 Subject: [PATCH] lldb: Link delayimp on Windows This is needed when building with `LLVM_LINK_LLVM_DYLIB` to build LLVM as a DLL on Windows. This effort is tracked in #109483. --- lldb/cmake/modules/AddLLDB.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake index 5d58abf237f58..6493df27f38db 100644 --- a/lldb/cmake/modules/AddLLDB.cmake +++ b/lldb/cmake/modules/AddLLDB.cmake @@ -172,6 +172,7 @@ function(add_lldb_executable name) if(NOT LIBLLDB_INDEX EQUAL -1) if (MSVC) target_link_options(${name} PRIVATE "/DELAYLOAD:$") + target_link_libraries(${name} PRIVATE delayimp) elseif (MINGW AND LINKER_IS_LLD) # LLD can delay load just by passing a --delayload flag, as long as the import # library is a short type import library (which LLD and MS link.exe produce).