summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlesandro Portale <alessandro.portale@qt.io>2022-04-12 16:32:55 +0200
committerAlessandro Portale <alessandro.portale@qt.io>2022-04-13 11:18:15 +0000
commitb54bf8ad867e0beddf0fcda6b4deacc3b6a0f7c8 (patch)
tree5b8ee0ecb92e6088b0c97deec9282831be04afb2
parent260095c92419e81a07fe031fdd002efc84afec0f (diff)
downloadqt-creator-b54bf8ad867e0beddf0fcda6b4deacc3b6a0f7c8.tar.gz
Debugger: Fix start of Android lldb from NDK 23.x on Linux
In order to help lldb locate libpython3.9.so, we need to point LD_LIBRARY_PATH to the right lib/ path inside the NDK. Fixes: QTCREATORBUG-27297 Change-Id: I4c234fabf291dfb5f5240120541897a79cb6933a Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
-rw-r--r--src/plugins/debugger/debuggeritem.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp
index 4a34596e2f..382bd6af8f 100644
--- a/src/plugins/debugger/debuggeritem.cpp
+++ b/src/plugins/debugger/debuggeritem.cpp
@@ -290,6 +290,13 @@ bool DebuggerItem::addAndroidLldbPythonEnv(const Utils::FilePath &lldbCmd, Utils
if (pythonBinDir.exists()) {
env.set("PYTHONHOME", pythonDir.toUserOutput());
env.prependOrSetPath(pythonBinDir);
+
+ if (HostOsInfo::isAnyUnixHost()) {
+ const FilePath pythonLibDir = pythonDir.pathAppended("lib");
+ if (pythonLibDir.exists())
+ env.prependOrSet("LD_LIBRARY_PATH", pythonLibDir.toString());
+ }
+
return true;
}
}