diff options
author | serge-sans-paille <sguelton@mozilla.com> | 2022-10-30 18:25:04 +0100 |
---|---|---|
committer | serge-sans-paille <sguelton@mozilla.com> | 2022-11-01 23:54:06 +0100 |
commit | f71d32a0eea47b3d2bb43d6be15cf09d47ef6971 (patch) | |
tree | ffe2482243cf5ff681f84e82d6b4257fd73afe51 /bolt/lib/RuntimeLibs/RuntimeLibrary.cpp | |
parent | d94ee70f4f01e4d9eec49e02eff57a5655618401 (diff) | |
download | llvm-f71d32a0eea47b3d2bb43d6be15cf09d47ef6971.zip llvm-f71d32a0eea47b3d2bb43d6be15cf09d47ef6971.tar.gz llvm-f71d32a0eea47b3d2bb43d6be15cf09d47ef6971.tar.bz2 |
Honor LLVM_LIBDIR_SUFFIX
Some distribution install libraries under lib64. LLVM supports this
through LLVM_LIBDIR_SUFFIX, have bolt do the same.
Differential Revision: https://reviews.llvm.org/D137039
Diffstat (limited to 'bolt/lib/RuntimeLibs/RuntimeLibrary.cpp')
-rw-r--r-- | bolt/lib/RuntimeLibs/RuntimeLibrary.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp b/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp index 022fc7c..a11fd52 100644 --- a/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp +++ b/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp @@ -11,6 +11,7 @@ //===----------------------------------------------------------------------===// #include "bolt/RuntimeLibs/RuntimeLibrary.h" +#include "bolt/RuntimeLibs/RuntimeLibraryVariables.inc" #include "bolt/Utils/Utils.h" #include "llvm/BinaryFormat/Magic.h" #include "llvm/ExecutionEngine/RuntimeDyld.h" @@ -28,12 +29,12 @@ std::string RuntimeLibrary::getLibPath(StringRef ToolPath, StringRef LibFileName) { StringRef Dir = llvm::sys::path::parent_path(ToolPath); SmallString<128> LibPath = llvm::sys::path::parent_path(Dir); - llvm::sys::path::append(LibPath, "lib"); + llvm::sys::path::append(LibPath, "lib" LLVM_LIBDIR_SUFFIX); if (!llvm::sys::fs::exists(LibPath)) { // In some cases we install bolt binary into one level deeper in bin/, // we need to go back one more level to find lib directory. LibPath = llvm::sys::path::parent_path(llvm::sys::path::parent_path(Dir)); - llvm::sys::path::append(LibPath, "lib"); + llvm::sys::path::append(LibPath, "lib" LLVM_LIBDIR_SUFFIX); } llvm::sys::path::append(LibPath, LibFileName); if (!llvm::sys::fs::exists(LibPath)) { |