summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2018-01-29 18:25:06 +0000
committerMichal Gorny <mgorny@gentoo.org>2018-01-29 18:25:06 +0000
commitc061175fcde7b0a4b3cc3ced233164b714e961f4 (patch)
treec665b26ab48d5cf0938eb56992d25cb041a63e74 /lldb
parenteb13ebdb997127b2539829a26808ec3e3441cac3 (diff)
downloadbcm5719-llvm-c061175fcde7b0a4b3cc3ced233164b714e961f4.tar.gz
bcm5719-llvm-c061175fcde7b0a4b3cc3ced233164b714e961f4.zip
[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 llvm-svn: 323673
Diffstat (limited to 'lldb')
-rw-r--r--lldb/include/lldb/Host/Config.h.cmake2
-rw-r--r--lldb/source/Host/linux/HostInfoLinux.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/lldb/include/lldb/Host/Config.h.cmake b/lldb/include/lldb/Host/Config.h.cmake
index 73f4b8f6cc4..7fe7ec8ce6c 100644
--- a/lldb/include/lldb/Host/Config.h.cmake
+++ b/lldb/include/lldb/Host/Config.h.cmake
@@ -14,6 +14,8 @@
#cmakedefine LLDB_DISABLE_POSIX
+#define LLDB_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}"
+
#cmakedefine01 HAVE_SYS_EVENT_H
#cmakedefine01 HAVE_PPOLL
diff --git a/lldb/source/Host/linux/HostInfoLinux.cpp b/lldb/source/Host/linux/HostInfoLinux.cpp
index 8d59cda249e..e08666da834 100644
--- a/lldb/source/Host/linux/HostInfoLinux.cpp
+++ b/lldb/source/Host/linux/HostInfoLinux.cpp
@@ -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::ComputeSupportExeDirectory(FileSpec &file_spec) {
}
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;
}
OpenPOWER on IntegriCloud