Remove dependency from Host to python
Summary:
The only reason python was used in the Host module was to compute the
python path. I resolve this the same way as D47384 did for clang, by
moving the path computation into the python plugin and modifying
SBHostOS class to call into this module for ePathTypePythonDir.
Reviewers: zturner, jingham, davide
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D48215
llvm-svn: 335104
diff --git a/lldb/source/API/SBHostOS.cpp b/lldb/source/API/SBHostOS.cpp
index f74c63c..812d6a7 100644
--- a/lldb/source/API/SBHostOS.cpp
+++ b/lldb/source/API/SBHostOS.cpp
@@ -18,6 +18,7 @@
#include "lldb/Utility/Log.h"
#include "Plugins/ExpressionParser/Clang/ClangHost.h"
+#include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Path.h"
@@ -48,7 +49,7 @@
fspec = HostInfo::GetHeaderDir();
break;
case ePathTypePythonDir:
- fspec = HostInfo::GetPythonDir();
+ fspec = ScriptInterpreterPython::GetPythonDir();
break;
case ePathTypeLLDBSystemPlugins:
fspec = HostInfo::GetSystemPluginDir();