[clang] 4dc0455 - [AIX][r] Do not call AddFilePathLibArgs with -r

Michael Francis via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 21 19:26:00 PDT 2023


Author: Michael Francis
Date: 2023-03-22T02:25:46Z
New Revision: 4dc04557d71c1752c53eb8025957df8f1bdbb1e1

URL: https://github.com/llvm/llvm-project/commit/4dc04557d71c1752c53eb8025957df8f1bdbb1e1
DIFF: https://github.com/llvm/llvm-project/commit/4dc04557d71c1752c53eb8025957df8f1bdbb1e1.diff

LOG: [AIX][r] Do not call AddFilePathLibArgs with -r

We do not want to add file path lib args when -r is specified.

Differential Revision: https://reviews.llvm.org/D146578

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 5521a38d9bc0a..711e8619d0a79 100644
--- a/clang/lib/Driver/ToolChains/AIX.cpp
+++ b/clang/lib/Driver/ToolChains/AIX.cpp
@@ -234,8 +234,8 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA,
 
   // Add directory to library search path.
   Args.AddAllArgs(CmdArgs, options::OPT_L);
-  ToolChain.AddFilePathLibArgs(Args, CmdArgs);
   if (!Args.hasArg(options::OPT_r)) {
+    ToolChain.AddFilePathLibArgs(Args, CmdArgs);
     ToolChain.addProfileRTLibs(Args, CmdArgs);
 
     if (getToolChain().ShouldLinkCXXStdlib(Args))


        


More information about the cfe-commits mailing list