summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
diff options
context:
space:
mode:
authorserge-sans-paille <sguelton@redhat.com>2019-11-05 11:38:39 +0100
committerserge-sans-paille <sguelton@redhat.com>2019-11-05 11:39:19 +0100
commit9357b5d08497326a1895cab6c1d712bf12a34519 (patch)
tree4d9ce6e89c165af01b220532b12c0b84b84dc4d1 /lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
parent0e56b0f94bfc683c5a95e96784cfc9229a730bc8 (diff)
downloadbcm5719-llvm-9357b5d08497326a1895cab6c1d712bf12a34519.tar.gz
bcm5719-llvm-9357b5d08497326a1895cab6c1d712bf12a34519.zip
Revert and patch "[Python] Remove readline module"
Fix https://bugs.llvm.org/show_bug.cgi?id=43830 while avoiding polluting the global Python namespace. This both reverts r357277 to rebundle a version of Python's readline module based on libedit. However, this patch also provides two improvements over the previous implementation: 1. use PyMem_RawMalloc instead of PyMem_Malloc, as expected by PyOS_Readline (prevents to segfault upon exit of interactive session) 2. patch the readline module upon embedded interpreter loading, instead of patching it globally, which should prevent any side effect on other modules/packages 3. only activate the patched module if libedit is actually linked in lldb Differential Revision: https://reviews.llvm.org/D69793
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
index 54b5c236f75..6febb038578 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
@@ -5,6 +5,7 @@ add_definitions(-DLLDB_PYTHON_RELATIVE_LIBDIR="${LLDB_PYTHON_RELATIVE_PATH}")
add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
PythonDataObjects.cpp
+ PythonReadline.cpp
ScriptInterpreterPython.cpp
LINK_LIBS
OpenPOWER on IntegriCloud