Skip to content

Commit c73bf5f

Browse files
fixup! [lldb][windows] print an error if python.dll is not in the DLL search path
1 parent d502ba9 commit c73bf5f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

lldb/tools/driver/Driver.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -495,13 +495,18 @@ bool IsPythonDLLInPath() {
495495

496496
void SetupPythonRuntimeLibrary() {
497497
#ifdef LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME
498-
if (!IsPythonDLLInPath())
498+
if (IsPythonDLLInPath())
499+
return;
499500
#ifdef LLDB_PYTHON_DLL_RELATIVE_PATH
500-
if (AddPythonDLLToSearchPath())
501-
return
501+
if (AddPythonDLLToSearchPath())
502+
return
502503
#endif
503-
llvm::errs() << "error: unable to find "
504-
<< LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME << ".\n";
504+
llvm::errs() << "error: unable to find "
505+
<< LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME << ".\n";
506+
return;
507+
#elifdef LLDB_PYTHON_DLL_RELATIVE_PATH
508+
if (!AddPythonDLLToSearchPath())
509+
llvm::errs() << "error: unable to find the Python runtime library.\n";
505510
#endif
506511
}
507512
#endif

0 commit comments

Comments
 (0)