[Lldb-commits] [lldb] r323673 - [Host] Respect LLVM_LIBDIR_SUFFIX when looking for LLDB plugins on Linux
Michal Gorny via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 29 10:25:06 PST 2018
Author: mgorny
Date: Mon Jan 29 10:25:06 2018
New Revision: 323673
URL: http://llvm.org/viewvc/llvm-project?rev=323673&view=rev
Log:
[Host] Respect LLVM_LIBDIR_SUFFIX when looking for LLDB plugins on Linux
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.
Differential Revision: https://reviews.llvm.org/D42317
Modified:
lldb/trunk/include/lldb/Host/Config.h.cmake
lldb/trunk/source/Host/linux/HostInfoLinux.cpp
Modified: lldb/trunk/include/lldb/Host/Config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Config.h.cmake?rev=323673&r1=323672&r2=323673&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Config.h.cmake (original)
+++ lldb/trunk/include/lldb/Host/Config.h.cmake Mon Jan 29 10:25:06 2018
@@ -14,6 +14,8 @@
#cmakedefine LLDB_DISABLE_POSIX
+#define LLDB_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}"
+
#cmakedefine01 HAVE_SYS_EVENT_H
#cmakedefine01 HAVE_PPOLL
Modified: lldb/trunk/source/Host/linux/HostInfoLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/HostInfoLinux.cpp?rev=323673&r1=323672&r2=323673&view=diff
==============================================================================
--- lldb/trunk/source/Host/linux/HostInfoLinux.cpp (original)
+++ lldb/trunk/source/Host/linux/HostInfoLinux.cpp Mon Jan 29 10:25:06 2018
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "lldb/Host/Config.h"
#include "lldb/Host/linux/HostInfoLinux.h"
#include "lldb/Utility/Log.h"
@@ -204,7 +205,7 @@ bool HostInfoLinux::ComputeSupportExeDir
}
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());
return true;
}
More information about the lldb-commits
mailing list