File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -492,12 +492,20 @@ bool IsPythonDLLInPath() {
492492}
493493#endif
494494
495+ // / Try to setup the DLL search path for the Python Runtime Library
496+ // / (python3xx.dll).
497+ // /
498+ // / If `LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME` is set, we first check if
499+ // / python3xx.dll is in the search path. If it's not, we try to add it and
500+ // / check for it a second time.
501+ // / If only `LLDB_PYTHON_DLL_RELATIVE_PATH` is set, we try to add python3xx.dll
502+ // / to the search path python.dll is already in the search path or not.
495503void SetupPythonRuntimeLibrary () {
496504#ifdef LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME
497505 if (IsPythonDLLInPath ())
498506 return ;
499507#ifdef LLDB_PYTHON_DLL_RELATIVE_PATH
500- if (AddPythonDLLToSearchPath ())
508+ if (AddPythonDLLToSearchPath () && IsPythonDLLInPath () )
501509 return ;
502510#endif
503511 llvm::errs () << " error: unable to find '"
You can’t perform that action at this time.
0 commit comments