File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,26 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
196
196
COMMENT "Copying Python DLL to LLDB binaries directory." )
197
197
endif ()
198
198
199
+ # Since Python3.8 the Windows runtime loads dependent DLLs only from the directory of the binary
200
+ # itself (and not Path). Windows has no notion RPATHs, so we must copy all DLLs that we depend on
201
+ # into the Python package. Plus swiftCore which is a transitive (but no direct) dependency.
202
+ if (WIN32 AND LLDB_ENABLE_SWIFT_SUPPORT )
203
+ # TARGET_RUNTIME_DLLS is supported in CMake 3.21+
204
+ if ("${CMAKE_VERSION} " VERSION_LESS "3.21.0" )
205
+ if (LLDB_INCLUDE_TESTS )
206
+ message (SEND_ERROR
207
+ "Your CMake version is ${CMAKE_VERSION} . In order to run LLDB tests "
208
+ "on Windows please upgrade to 3.21.0 at least (or disable tests with "
209
+ "LLDB_INCLUDE_TESTS=Off)" )
210
+ endif ()
211
+ else ()
212
+ # swiftCore is defined in swift/stdlib/public/core/CMakeLists.txt
213
+ # It's not configured yet, so we cannot depend on it.
214
+ add_custom_command (TARGET ${swig_target} POST_BUILD
215
+ COMMAND ${CMAKE_COMMAND} -E copy -t ${lldb_python_target_dir} $< TARGET_RUNTIME_DLLS:liblldb> ${SWIFT_BINARY_DIR} /bin/swiftCore.dll
216
+ COMMAND_EXPAND_LISTS )
217
+ endif ()
218
+ endif ()
199
219
200
220
endfunction ()
201
221
You can’t perform that action at this time.
0 commit comments