Skip to content

Commit c061175

Browse files
committedJan 29, 2018
[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
1 parent eb13ebd commit c061175

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
 

‎lldb/include/lldb/Host/Config.h.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#cmakedefine LLDB_DISABLE_POSIX
1616

17+
#define LLDB_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}"
18+
1719
#cmakedefine01 HAVE_SYS_EVENT_H
1820

1921
#cmakedefine01 HAVE_PPOLL

‎lldb/source/Host/linux/HostInfoLinux.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88
//===----------------------------------------------------------------------===//
99

10+
#include "lldb/Host/Config.h"
1011
#include "lldb/Host/linux/HostInfoLinux.h"
1112
#include "lldb/Utility/Log.h"
1213

@@ -204,7 +205,7 @@ bool HostInfoLinux::ComputeSupportExeDirectory(FileSpec &file_spec) {
204205
}
205206

206207
bool HostInfoLinux::ComputeSystemPluginsDirectory(FileSpec &file_spec) {
207-
FileSpec temp_file("/usr/lib/lldb/plugins", true);
208+
FileSpec temp_file("/usr/lib" LLDB_LIBDIR_SUFFIX "/lldb/plugins", true);
208209
file_spec.GetDirectory().SetCString(temp_file.GetPath().c_str());
209210
return true;
210211
}

0 commit comments

Comments
 (0)
Please sign in to comment.