[Lldb-commits] [lldb] [lldb][windows] print an error if python.dll is not in the DLL search path (PR #164893)

Martin Storsjö via lldb-commits lldb-commits at lists.llvm.org
Sat Oct 25 13:34:05 PDT 2025


mstorsjo wrote:

Anyway, so with my setup of manually setting `Python3_LIBRARIES` and `Python3_INCLUDE_DIRS` rather than letting `FindPython` set it all up, I guess it's reasonable for me to not get this set automatically either, if we can't. In this case, the built LLDB won't get the potential warning on startup, and that's also probably fine.

I did check the original approach, of guessing the library name, and that does seem to work to the point of getting the version number right and all. It does need adding `${CMAKE_SHARED_LIBRARY_PREFIX}` at the start though.

I.e. this snippet seems to work for me:
```
  set(LLDB_PYTHON_SHARED_LIBRARY_FILENAME
    "${CMAKE_SHARED_LIBRARY_PREFIX}python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}${CMAKE_SHARED_LIBRARY_SUFFIX}")
```

But I don't mind keeping the current suggestion, as it won't produce any spurious runtime warnings in LLDB anyway. It would be nice to check if the target `Python3::Python` actually exists to avoid the cmake warning I quoted above though, but it's not critical.

https://github.com/llvm/llvm-project/pull/164893


More information about the lldb-commits mailing list