Skip to content

Commit

Permalink
[flang] Add driver install directory to AIX toolchain program paths l…
Browse files Browse the repository at this point in the history
…ist.

flang-new encounters an issue where its unable to invoke itself because the
install directory was missing from the program paths on AIX.

Reviewed By: w2yehia

Differential Revision: https://reviews.llvm.org/D140628
  • Loading branch information
pscoro authored and Wael Yehia committed Jan 26, 2023
1 parent 0e754e1 commit 5e72407
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clang/lib/Driver/ToolChains/AIX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA,
/// AIX - AIX tool chain which can call as(1) and ld(1) directly.
AIX::AIX(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
: ToolChain(D, Triple, Args) {
getProgramPaths().push_back(getDriver().getInstalledDir());
if (getDriver().getInstalledDir() != getDriver().Dir)
getProgramPaths().push_back(getDriver().Dir);

ParseInlineAsmUsingAsmParser = Args.hasFlag(
options::OPT_fintegrated_as, options::OPT_fno_integrated_as, true);
getLibraryPaths().push_back(getDriver().SysRoot + "/usr/lib");
Expand Down

0 comments on commit 5e72407

Please sign in to comment.