[Lldb-commits] [lldb] f34adfe - build: add `LINKER:` modifier to `/DELAYLOAD:` options (#185086)
via lldb-commits
lldb-commits at lists.llvm.org
Sat Mar 7 11:33:35 PST 2026
Author: Saleem Abdulrasool
Date: 2026-03-07T11:33:31-08:00
New Revision: f34adfebc106a2b18e59664bf10b2b0c2f81ed69
URL: https://github.com/llvm/llvm-project/commit/f34adfebc106a2b18e59664bf10b2b0c2f81ed69
DIFF: https://github.com/llvm/llvm-project/commit/f34adfebc106a2b18e59664bf10b2b0c2f81ed69.diff
LOG: build: add `LINKER:` modifier to `/DELAYLOAD:` options (#185086)
When building with the GNU driver, we would pass in `/DELAYLOAD:...`
without indicating that this is a linker flag. `clang` does not
implictly forward non-consumed options to the linker like `cl` does, and
this would cause the build to fail.
Added:
Modified:
lldb/cmake/modules/AddLLDB.cmake
Removed:
################################################################################
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake
index 6493df27f38db..ea5729f07229f 100644
--- a/lldb/cmake/modules/AddLLDB.cmake
+++ b/lldb/cmake/modules/AddLLDB.cmake
@@ -171,7 +171,8 @@ function(add_lldb_executable name)
list(FIND ARG_LINK_LIBS liblldb LIBLLDB_INDEX)
if(NOT LIBLLDB_INDEX EQUAL -1)
if (MSVC)
- target_link_options(${name} PRIVATE "/DELAYLOAD:$<TARGET_FILE_NAME:liblldb>")
+ target_link_options(${name} PRIVATE
+ "LINKER:/DELAYLOAD:$<TARGET_FILE_NAME:liblldb>")
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
More information about the lldb-commits
mailing list