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());
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());
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits