[Lldb-commits] [PATCH] D42317: [Host] Respect LLVM_LIBDIR_SUFFIX when looking for LLDB plugins on Linux

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 29 08:56:21 PST 2018

mgorny added inline comments.

Comment at: source/Host/linux/HostInfoLinux.cpp:208
 bool HostInfoLinux::ComputeSystemPluginsDirectory(FileSpec &file_spec) {
-  FileSpec temp_file("/usr/lib/lldb/plugins", true);
+  FileSpec temp_file("/usr/lib" LLDB_LIBDIR_SUFFIX "/lldb/plugins", true);
clayborg wrote:
> 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?
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.


More information about the lldb-commits mailing list