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);
   file_spec.GetDirectory().SetCString(temp_file.GetPath().c_str());
----------------
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.


https://reviews.llvm.org/D42317



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to