[clang] 5e72407 - [flang] Add driver install directory to AIX toolchain program paths list.
    Wael Yehia via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed Jan 25 16:40:10 PST 2023
    
    
  
Author: Paul Scoropan
Date: 2023-01-26T00:39:51Z
New Revision: 5e72407635a43b8b7f85c1658b6738f023a21f03
URL: https://github.com/llvm/llvm-project/commit/5e72407635a43b8b7f85c1658b6738f023a21f03
DIFF: https://github.com/llvm/llvm-project/commit/5e72407635a43b8b7f85c1658b6738f023a21f03.diff
LOG: [flang] Add driver install directory to AIX toolchain program paths list.
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
Added: 
    
Modified: 
    clang/lib/Driver/ToolChains/AIX.cpp
Removed: 
    
################################################################################
diff  --git a/clang/lib/Driver/ToolChains/AIX.cpp b/clang/lib/Driver/ToolChains/AIX.cpp
index abbd3ef6c68f3..f62b566c3946e 100644
--- a/clang/lib/Driver/ToolChains/AIX.cpp
+++ b/clang/lib/Driver/ToolChains/AIX.cpp
@@ -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");
        
    
    
More information about the cfe-commits
mailing list