================ @@ -338,6 +338,13 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-lpthread"); } const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath()); + +// Required for 64-bit atomic operations used in sanitizer runtimes +// (e.g., sanitizer_common's atomic utilities). On 32-bit AIX, these +// are not natively supported, necessitating linkage with -latomic. + if (Sanitize.hasAnySanitizer() && IsArch32Bit) { + CmdArgs.push_back("-latomic"); ---------------- hubert-reinterpretcast wrote:
re: https://github.com/llvm/llvm-project/pull/125388/files#r1945365070: > By keeping it in AIX.cpp, we maintain a clear separation between > platform-specific behavior and the more general sanitizer runtime dependency > logic. In this case, the actual result would have been unintentional platform-specific behaviour. https://github.com/llvm/llvm-project/pull/125388 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits