[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
Thu Oct 23 14:17:20 PDT 2025
================
@@ -776,8 +796,13 @@ int main(int argc, char const *argv[]) {
"~/Library/Logs/DiagnosticReports/.\n");
#endif
-#if defined(_WIN32) && defined(LLDB_PYTHON_DLL_RELATIVE_PATH)
- AddPythonDLLToSearchPath();
+#if defined(_WIN32) && defined(LLDB_PYTHON_SHARED_LIBRARY_FILENAME)
+ if (!IsPythonDLLInPath())
+#ifdef LLDB_PYTHON_DLL_RELATIVE_PATH
----------------
mstorsjo wrote:
This condition nesting doesn't seem right. If we have `LLDB_PYTHON_DLL_RELATIVE_PATH` defined, but we don't have `LLDB_PYTHON_SHARED_LIBRARY_FILENAME`, then we no longer will call `AddPythonDLLToSearchPath` at all - which we did before. Not sure what the neatest form of this is; maybe an `#elif defined(LLDB_PYTHON_DLL_RELATIVE_PATH) AddPythonDLLToSearchPath(); #endif`?
https://github.com/llvm/llvm-project/pull/164893
More information about the lldb-commits
mailing list