Fix the Linux plugin lookup path to include appropriate libdir suffix
for the system. To accomplish this, store the value of
LLVM_LIBDIR_SUFFIX in lldb/Host/Config.h as LLDB_LIBDIR_SUFFIX,
and use this variable when defining the plugin path.
Details
- Reviewers
k8stone zturner beanz labath clayborg - Commits
- rGc061175fcde7: [Host] Respect LLVM_LIBDIR_SUFFIX when looking for LLDB plugins on Linux
rLLDB323673: [Host] Respect LLVM_LIBDIR_SUFFIX when looking for LLDB plugins on Linux
rL323673: [Host] Respect LLVM_LIBDIR_SUFFIX when looking for LLDB plugins on Linux
Diff Detail
Event Timeline
Disclaimer: I have never seen a plugin for LLDB. I've just noticed the wrong path in strace output and fixed it ;-).
We have one plugin in-tree (tools/intel-features), but I'm not sure if anyone uses/installs it.
In any case, the change seems like the right thing to do.
source/Host/linux/HostInfoLinux.cpp | ||
---|---|---|
208 | Is there no setting that sets the start of the path here ("/usr/lib")? Not sure how open source projects handle this, but it seems that this should be a build setting that defaults to "/usr/lib" and can be modified? |
source/Host/linux/HostInfoLinux.cpp | ||
---|---|---|
208 | Well, yes, this is something that could be possibly be done but TBH I don't really know how exactly it should be done. For autoconf projects, you generally do something like -Dbindir=$(bindir) in the Makefile. For CMake projects, I suppose this could be CMAKE_INSTALL_PREFIX, except I don't know if it has any corner cases. AFAIK clang uses path relative to executable to find compiler-rt, so maybe that would be revelant here as well. In other words, I went for fixing the most obvious bug, and leaving the harder (yet less frequent) problem to somebody else. |
Is there no setting that sets the start of the path here ("/usr/lib")? Not sure how open source projects handle this, but it seems that this should be a build setting that defaults to "/usr/lib" and can be modified?