[clang] 7e2edf9 - [compiler-rt][AIX]: Link compiler-rt profile library when -fprofile-generate is specified

via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 06:55:53 PST 2020


Author: etiotto
Date: 2020-11-04T09:54:54-05:00
New Revision: 7e2edf973b64b3554404e527f506ad5bc44d9cba

URL: https://github.com/llvm/llvm-project/commit/7e2edf973b64b3554404e527f506ad5bc44d9cba
DIFF: https://github.com/llvm/llvm-project/commit/7e2edf973b64b3554404e527f506ad5bc44d9cba.diff

LOG: [compiler-rt][AIX]: Link compiler-rt profile library when -fprofile-generate is specified

This patch enhances the clang driver to link the runtime profile
library on AIX when the -fprofile-generate option is used.

Reviewed By: phosek

Differentail Revision: https://reviews.llvm.org/D90641

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 b833ebaebf92..47ce99a7c625 100644
--- a/clang/lib/Driver/ToolChains/AIX.cpp
+++ b/clang/lib/Driver/ToolChains/AIX.cpp
@@ -151,6 +151,7 @@ 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);
+  ToolChain.addProfileRTLibs(Args, CmdArgs);
 
   if (getToolChain().ShouldLinkCXXStdlib(Args))
     getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);


        


More information about the cfe-commits mailing list