[llvm] [BOLT] Enable standalone build (PR #97130)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 17 23:08:09 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 484fdb901f2cc39b122489508009947910001213 90ec2ebfa3107222b961b2b1a4844234221dd158 --extensions cpp,h -- bolt/include/bolt/RuntimeLibs/RuntimeLibrary.h bolt/lib/RuntimeLibs/RuntimeLibrary.cpp bolt/lib/Utils/CommandLineOpts.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/bolt/include/bolt/RuntimeLibs/RuntimeLibrary.h b/bolt/include/bolt/RuntimeLibs/RuntimeLibrary.h
index c224ed8450..7cf74be30a 100644
--- a/bolt/include/bolt/RuntimeLibs/RuntimeLibrary.h
+++ b/bolt/include/bolt/RuntimeLibs/RuntimeLibrary.h
@@ -58,8 +58,10 @@ protected:
uint64_t RuntimeFiniAddress{0};
uint64_t RuntimeStartAddress{0};
- /// Get the full path to a runtime library specified by \p LibFileName and \p ToolPath.
- static std::string getLibPathByToolPath(StringRef ToolPath, StringRef LibFileName);
+ /// Get the full path to a runtime library specified by \p LibFileName and \p
+ /// ToolPath.
+ static std::string getLibPathByToolPath(StringRef ToolPath,
+ StringRef LibFileName);
/// Get the full path to a runtime library by the install directory
static std::string getLibPathByInstalled(StringRef LibFileName);
diff --git a/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp b/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp
index a4b9395bc8..09e94a29ef 100644
--- a/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp
+++ b/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp
@@ -27,7 +27,7 @@ using namespace bolt;
void RuntimeLibrary::anchor() {}
std::string RuntimeLibrary::getLibPathByToolPath(StringRef ToolPath,
- StringRef LibFileName) {
+ 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_LIBDIR_SUFFIX);
@@ -59,7 +59,8 @@ std::string RuntimeLibrary::getLibPath(StringRef ToolPath,
return ByInstalled;
}
- errs() << "BOLT-ERROR: library not found: " << ByTool << " or " << ByInstalled << "\n";
+ errs() << "BOLT-ERROR: library not found: " << ByTool << " or " << ByInstalled
+ << "\n";
exit(1);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/97130
More information about the llvm-commits
mailing list