[PATCH] D137375: [AIX][pg] Add Correct Search Paths for Profiled Libraries
Michael Francis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 3 16:08:15 PDT 2022
francii created this revision.
Herald added a project: All.
francii requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.
On AIX, profiled system libraries are stored at `/lib/profiled` and `/usr/lib/profiled`. When compiling with `-pg`, we want to link against libraries in those directories. This PR modifies the AIX toolchain to add those directories to the linker search paths.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137375
Files:
clang/lib/Driver/ToolChains/AIX.cpp
Index: clang/lib/Driver/ToolChains/AIX.cpp
===================================================================
--- clang/lib/Driver/ToolChains/AIX.cpp
+++ clang/lib/Driver/ToolChains/AIX.cpp
@@ -250,6 +250,11 @@
CmdArgs.push_back("-lm");
CmdArgs.push_back("-lc");
+
+ if (Args.hasArg(options::OPT_pg)) {
+ CmdArgs.push_back("-L/lib/profiled");
+ CmdArgs.push_back("-L/usr/lib/profiled");
+ }
}
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137375.473073.patch
Type: text/x-patch
Size: 498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221103/4c9c70d1/attachment.bin>
More information about the cfe-commits
mailing list