forked from qt-creator/qt-creator
Debugger: (Re-)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.
Amends: b54bf8ad86
Reason for amend: The "prepend" use-case of Environment::prependOrSet
failed due to the undefined separator. Now, use
Environment::prependOrSetLibrarySearchPath instead, since that handles
the separator and knows the environment variable name.
Fixes: QTCREATORBUG-27297
Change-Id: I770a6335a7a26c65d23c930f7d6f9795b3dc52b5
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -294,7 +294,7 @@ bool DebuggerItem::addAndroidLldbPythonEnv(const Utils::FilePath &lldbCmd, Utils
|
|||||||
if (HostOsInfo::isAnyUnixHost()) {
|
if (HostOsInfo::isAnyUnixHost()) {
|
||||||
const FilePath pythonLibDir = pythonDir.pathAppended("lib");
|
const FilePath pythonLibDir = pythonDir.pathAppended("lib");
|
||||||
if (pythonLibDir.exists())
|
if (pythonLibDir.exists())
|
||||||
env.prependOrSet("LD_LIBRARY_PATH", pythonLibDir.toString());
|
env.prependOrSetLibrarySearchPath(pythonLibDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user