diff options
author | Chaoren Lin <chaorenl@google.com> | 2015-03-24 23:07:02 +0000 |
---|---|---|
committer | Chaoren Lin <chaorenl@google.com> | 2015-03-24 23:07:02 +0000 |
commit | f9e915ae101a8921f6e6d3c2ae8bb079a1f1e492 (patch) | |
tree | bb9f1f64538e3bc307156fb050b5637b2d0258ab /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | c756b2dfac6f0c177cb28c26b72f70aae56c009d (diff) | |
download | llvm-f9e915ae101a8921f6e6d3c2ae8bb079a1f1e492.zip llvm-f9e915ae101a8921f6e6d3c2ae8bb079a1f1e492.tar.gz llvm-f9e915ae101a8921f6e6d3c2ae8bb079a1f1e492.tar.bz2 |
ComputeSupportExeDirectory for Linux
Summary:
Fixes http://reviews.llvm.org/D8511
The original method of using dladdr() could return the incorrect relative
path if not dynamically linked against liblldb and the working directory
has changed. This is not a problem when built with python, since
ScriptInterpreterPython::InitializePrivate calls
HostInfo::GetLLDBPath(ePathTypeLLDBShlibDir, ...) and caches the
correct path before any changes to the working directory.
The /proc/self/exe approach fails if run using Python, but works for all other
cases (including for android, which doesn't have dladdr()).
So if we combine the two, we should reasonably cover all corner cases.
Reviewers: vharron, ovyalov, clayborg
Reviewed By: ovyalov, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8570
llvm-svn: 233129
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions