[PATCH] D133480: [llvm-dwp] Get the DWO file using relative path instead of absolute path to make it work for distribution build
Qing Shan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 8 16:23:48 PDT 2022
steven.zhang updated this revision to Diff 458911.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133480/new/
https://reviews.llvm.org/D133480
Files:
llvm/tools/llvm-dwp/llvm-dwp.cpp
Index: llvm/tools/llvm-dwp/llvm-dwp.cpp
===================================================================
--- llvm/tools/llvm-dwp/llvm-dwp.cpp
+++ llvm/tools/llvm-dwp/llvm-dwp.cpp
@@ -71,7 +71,10 @@
if (!DWOCompDir.empty()) {
SmallString<16> DWOPath(std::move(DWOName));
sys::fs::make_absolute(DWOCompDir, DWOPath);
- DWOPaths.emplace_back(DWOPath.data(), DWOPath.size());
+ if (sys::fs::exists(DWOPath))
+ DWOPaths.emplace_back(DWOPath.data(), DWOPath.size());
+ else
+ DWOPaths.push_back(std::move(DWOName));
} else {
DWOPaths.push_back(std::move(DWOName));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133480.458911.patch
Type: text/x-patch
Size: 629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220908/114a55dd/attachment.bin>
More information about the llvm-commits
mailing list