-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[llvm-bolt] Modify getLibPath
to enable --runtime-instrumentation-lib
option handle full path correctly.(llvm#99772)
#99806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…lib` option handle full path correctly.
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write If you have received no comments on your PR for a week, you can request a review If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@llvm/pr-subscribers-bolt Author: Zimo Ji (lltsdyp) ChangesFull diff: https://github.com/llvm/llvm-project/pull/99806.diff 1 Files Affected:
diff --git a/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp b/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp
index 276b034d71f96..0826847ee1189 100644
--- a/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp
+++ b/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp
@@ -28,6 +28,12 @@ void RuntimeLibrary::anchor() {}
std::string RuntimeLibrary::getLibPath(StringRef ToolPath,
StringRef LibFileName) {
+ // Handle full path.
+ // It is weird that append LibFileName to LibPath when user gives a full path.
+ if(LibFileName[0]=='/')
+ {
+ return LibFileName.str();
+ }
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);
|
getLibPath
to enable --runtime-instrumentation-lib
option handle full path correctly.(llvm#99772)getLibPath
to enable --runtime-instrumentation-lib
option handle full path correctly.(lhttps://github.com/llvm/llvm-project/issues/99772)
getLibPath
to enable --runtime-instrumentation-lib
option handle full path correctly.(lhttps://github.com/llvm/llvm-project/issues/99772)getLibPath
to enable --runtime-instrumentation-lib
option handle full path correctly.(https://github.com/llvm/llvm-project/issues/99772)
getLibPath
to enable --runtime-instrumentation-lib
option handle full path correctly.(https://github.com/llvm/llvm-project/issues/99772)getLibPath
to enable --runtime-instrumentation-lib
option handle full path correctly.(llvm[#99772](https://github.com/llvm/llvm-project/issues/99772))
getLibPath
to enable --runtime-instrumentation-lib
option handle full path correctly.(llvm[#99772](https://github.com/llvm/llvm-project/issues/99772))getLibPath
to enable --runtime-instrumentation-lib
option handle full path correctly.(llvm#99772)
In my previous commit, I forget to add an error ha ndler when given full path.
Hmm, I forgot to verify the existence of the runtime instrumentation library so I modified it and open a new PR |
Oops, it seems like my new commits were included in this PR so I don't need to open a new PR |
Thanks for the fix! Currently #97130 PR is already working on this function, though. If that PR doesn't land, we can land this one. |
@lltsdyp the above PR now landed; looks like there are straightforward conflicts to resolve. |
No description provided.