[clang] [clang] Implement address sanitizer on AIX (1/6) (PR #129925)
David Tenty via cfe-commits
cfe-commits at lists.llvm.org
Mon May 5 20:57:17 PDT 2025
================
@@ -1364,6 +1364,19 @@ static bool addSanitizerDynamicList(const ToolChain &TC, const ArgList &Args,
// the option, so don't try to pass it.
if (TC.getTriple().isOSSolaris() && !LinkerIsGnuLd)
return true;
+
+ if (TC.getTriple().isOSAIX()) {
+ SmallString<128> SanRTSymbolList;
+ (Twine(TC.getCompilerRTPath()) + "/" + Sanitizer +
+ ".link_with_main_exec.txt")
+ .toVector(SanRTSymbolList);
+ if (llvm::sys::fs::exists(SanRTSymbolList)) {
+ CmdArgs.push_back(Args.MakeArgString(Twine("-bE:") + SanRTSymbolList));
----------------
daltenty wrote:
Ditto comment about missing lists.
I guess we can't use exactly the same list as `--dynamic-list=` because format is slightly different, but I'm guessing we can generate it in a similar fashion.
https://github.com/llvm/llvm-project/pull/129925
More information about the cfe-commits
mailing list