forked from OSchip/llvm-project
[BOLT] Fix value invalidation bug in runtimelib
Summary: We can't use a fragment of the old LibPath as an input to create a new one. (cherry picked from FBD27642728)
This commit is contained in:
parent
35732d954b
commit
dc2673a039
|
@ -32,7 +32,7 @@ std::string RuntimeLibrary::getLibPath(StringRef ToolPath,
|
|||
// 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(LibPath));
|
||||
llvm::sys::path::parent_path(llvm::sys::path::parent_path(Dir));
|
||||
llvm::sys::path::append(LibPath, "lib");
|
||||
}
|
||||
llvm::sys::path::append(LibPath, LibFileName);
|
||||
|
|
Loading…
Reference in New Issue