[Driver] Use libatomic for 32-bit SPARC atomics support
Even after D86621 <https://reviews.llvm.org/D86621>, `clang -m32` on Solaris/sparcv9 doesn't inline atomics with 8-byte operands, unlike `gcc`. This leads to many link failures in the testsuite (undefined references to `__atomic_load_8` and `__sync_val_compare_and_swap_8`. Until a proper codegen fix can be implemented, this patch works around the first of those by linking with `-latomic`. Tested on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D118021
Loading
Please sign in to comment