MaskRay added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:634 + // LLVM support for atomics on 32-bit SPARC V8+ is incomplete, so + // forcibly link with libatomic as a workaround. ---------------- `// TODO ...` and attach a bug link ================ Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:637 + if (getToolChain().getTriple().getArch() == llvm::Triple::sparc) { + CmdArgs.push_back("--as-needed"); + CmdArgs.push_back("-latomic"); ---------------- Such --as-needed usage is a bit fragile if clang driver in the future passes `--as-needed` in the beginning. Better to use --push-state if you have a not-too-old ld. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130569/new/ https://reviews.llvm.org/D130569 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits