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>
This commit is contained in:
Alesandro Portale
2022-04-12 16:32:55 +02:00
committed by Alessandro Portale
parent 260095c924
commit b54bf8ad86

View File

@@ -290,6 +290,13 @@ bool DebuggerItem::addAndroidLldbPythonEnv(const Utils::FilePath &lldbCmd, Utils
if (pythonBinDir.exists()) { if (pythonBinDir.exists()) {
env.set("PYTHONHOME", pythonDir.toUserOutput()); env.set("PYTHONHOME", pythonDir.toUserOutput());
env.prependOrSetPath(pythonBinDir); env.prependOrSetPath(pythonBinDir);
if (HostOsInfo::isAnyUnixHost()) {
const FilePath pythonLibDir = pythonDir.pathAppended("lib");
if (pythonLibDir.exists())
env.prependOrSet("LD_LIBRARY_PATH", pythonLibDir.toString());
}
return true; return true;
} }
} }