diff options
| author | Pavel Labath <pavel@labath.sk> | 2022-01-03 14:48:13 +0100 |
|---|---|---|
| committer | Pavel Labath <pavel@labath.sk> | 2022-01-03 14:48:13 +0100 |
| commit | 862fffd8231c8c44a8ea8071041eac8919aed346 (patch) | |
| tree | d1bc0e8a0ddc7c4b9bf3238bbdce9474dab586ca /lldb/source/Plugins | |
| parent | ca271f4ef5a2a4bf115ac11ada70bbd7c737d77d (diff) | |
| download | llvm-862fffd8231c8c44a8ea8071041eac8919aed346.tar.gz llvm-862fffd8231c8c44a8ea8071041eac8919aed346.tar.bz2 llvm-862fffd8231c8c44a8ea8071041eac8919aed346.zip | |
[lldb/qemu] Set qemu's "ld prefix" based on the platform sysroot
Both serve the same purpose (finding shared libraries) and allow one to
launch a dynamically linked executable by just specifying the platform
sysroot.
Diffstat (limited to 'lldb/source/Plugins')
| -rw-r--r-- | lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp b/lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp index 84e10042a97c..dd7546d8fa15 100644 --- a/lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp +++ b/lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp @@ -191,6 +191,8 @@ lldb::ProcessSP PlatformQemuUser::DebugProcess(ProcessLaunchInfo &launch_info, launch_info.SetArguments(args, true); Environment emulator_env = Host::GetEnvironment(); + if (ConstString sysroot = GetSDKRootDirectory()) + emulator_env["QEMU_LD_PREFIX"] = sysroot.GetStringRef().str(); for (const auto &KV : GetGlobalProperties().GetEmulatorEnvVars()) emulator_env[KV.first()] = KV.second; launch_info.GetEnvironment() = ComputeLaunchEnvironment( |
