Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion lldb/cmake/modules/AddLLDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,19 @@ function(add_lldb_executable name)
if(WIN32)
list(FIND ARG_LINK_LIBS liblldb LIBLLDB_INDEX)
if(NOT LIBLLDB_INDEX EQUAL -1)
target_link_options(${name} PRIVATE "/DELAYLOAD:$<TARGET_FILE_BASE_NAME:liblldb>.dll")
if (MSVC)
target_link_options(${name} PRIVATE "/DELAYLOAD:$<TARGET_FILE_NAME:liblldb>")
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).
# With ld.bfd, with long import libraries (as produced by GNU binutils), one
# has to generate a separate delayload import library with dlltool.
target_link_options(${name} PRIVATE "-Wl,--delayload=$<TARGET_FILE_NAME:liblldb>")
elseif (DEFINED LLDB_PYTHON_DLL_RELATIVE_PATH)
# If liblldb can't be delayloaded, then LLDB_PYTHON_DLL_RELATIVE_PATH will not
# have any effect.
message(WARNING "liblldb is not delay loaded, LLDB_PYTHON_DLL_RELATIVE_PATH has no effect")
endif()
endif()
endif()
if(CLANG_LINK_CLANG_DYLIB)
Expand Down
Loading