[PATCH] D138729: [AIX][LTO] Teaching lto-aix-system-assembler Relative Path and Tilde Resolution
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 12:35:38 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG573ff0f7d2b0: [AIX][LTO] Teaching lto-aix-system-assembler Relative Path and Tilde Resolution (authored by Qiongsi Wu <qiongsiwu at gmail.com>).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138729/new/
https://reviews.llvm.org/D138729
Files:
llvm/lib/LTO/LTOCodeGenerator.cpp
Index: llvm/lib/LTO/LTOCodeGenerator.cpp
===================================================================
--- llvm/lib/LTO/LTOCodeGenerator.cpp
+++ llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -118,7 +118,7 @@
cl::opt<std::string> AIXSystemAssemblerPath(
"lto-aix-system-assembler",
- cl::desc("Absolute path to the system assembler, picked up on AIX only"),
+ cl::desc("Path to a system assembler, picked up on AIX only"),
cl::value_desc("path"));
}
@@ -253,9 +253,15 @@
"Runing AIX system assembler when integrated assembler is available!");
// Set the system assembler path.
- std::string AssemblerPath(llvm::AIXSystemAssemblerPath.empty()
- ? "/usr/bin/as"
- : llvm::AIXSystemAssemblerPath.c_str());
+ SmallString<256> AssemblerPath("/usr/bin/as");
+ if (!llvm::AIXSystemAssemblerPath.empty()) {
+ if (llvm::sys::fs::real_path(llvm::AIXSystemAssemblerPath, AssemblerPath,
+ /* expand_tilde */ true)) {
+ emitError(
+ "Cannot find the assembler specified by lto-aix-system-assembler");
+ return false;
+ }
+ }
// Prepare inputs for the assember.
const auto &Triple = TargetMach->getTargetTriple();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138729.478012.patch
Type: text/x-patch
Size: 1264 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221125/ba8bb37d/attachment.bin>
More information about the llvm-commits
mailing list