summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-06-20 08:35:45 +0000
committerPavel Labath <labath@google.com>2018-06-20 08:35:45 +0000
commit2df331b0f78b90a5b0be1e247f3cce97709af964 (patch)
tree3db24e1ba9d0a8ef84761453bd883172a98d587c /lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
parentf29d777f847b2a3d0aec2a499490fa34815fc918 (diff)
downloadbcm5719-llvm-2df331b0f78b90a5b0be1e247f3cce97709af964.tar.gz
bcm5719-llvm-2df331b0f78b90a5b0be1e247f3cce97709af964.zip
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
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
index c337fc7b587..039b5e6eef7 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
@@ -1,3 +1,16 @@
+if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows" AND NOT LLDB_DISABLE_PYTHON)
+ # Call a python script to gather the arch-specific libdir for
+ # modules like the lldb module.
+ execute_process(
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../../../../scripts/get_relative_lib_dir.py
+ RESULT_VARIABLE get_libdir_status
+ OUTPUT_VARIABLE relative_libdir
+ )
+ if (get_libdir_status EQUAL 0)
+ add_definitions(-DLLDB_PYTHON_RELATIVE_LIBDIR="${relative_libdir}")
+ endif()
+endif()
+
add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
PythonDataObjects.cpp
PythonExceptionState.cpp
OpenPOWER on IntegriCloud