[Lldb-commits] [lldb] 6e1f2f5 - [lldb][windows] copy vcpkg runtime dlls (#200416)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 2 03:57:48 PDT 2026
Author: Charles Zablit
Date: 2026-06-02T11:57:43+01:00
New Revision: 6e1f2f513c84759e0d0727925dbb8c3a3e8b5199
URL: https://github.com/llvm/llvm-project/commit/6e1f2f513c84759e0d0727925dbb8c3a3e8b5199
DIFF: https://github.com/llvm/llvm-project/commit/6e1f2f513c84759e0d0727925dbb8c3a3e8b5199.diff
LOG: [lldb][windows] copy vcpkg runtime dlls (#200416)
Added:
Modified:
lldb/bindings/python/CMakeLists.txt
Removed:
################################################################################
diff --git a/lldb/bindings/python/CMakeLists.txt b/lldb/bindings/python/CMakeLists.txt
index 2916d004a389e..e4f978ed80bc3 100644
--- a/lldb/bindings/python/CMakeLists.txt
+++ b/lldb/bindings/python/CMakeLists.txt
@@ -157,6 +157,18 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
create_relative_symlink(${swig_target} ${LIBLLDB_SYMLINK_DEST}
${lldb_python_target_dir}/native/ ${LIBLLDB_SYMLINK_OUTPUT_FILE})
+ # On Windows, DLLs must reside alongside the .pyd extension so the loader finds them.
+ # Without this, importing _lldb fails at runtime when vcpkg-provided DLLs are not on PATH.
+ if(WIN32 AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET)
+ file(GLOB _lldb_vcpkg_runtime_dlls
+ "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin/*.dll")
+ if(_lldb_vcpkg_runtime_dlls)
+ add_custom_command(TARGET ${swig_target} POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_
diff erent
+ ${_lldb_vcpkg_runtime_dlls} "${lldb_python_target_dir}/native/"
+ COMMENT "Staging vcpkg runtime DLLs next to _lldb.pyd")
+ endif()
+ endif()
if (NOT WIN32)
add_dependencies(${swig_target} lldb-python-wrapper)
More information about the lldb-commits
mailing list