Update -latomic check to match the one in LLVM.

It's not entirely clear why the existing check does not work, but it seems to pass on clang++ even without -latomic, but causes the fish build to fail later.

Confirmed that with this change, g++ does not use -latomic, while clang++ does, and fish builds fine with both.
This commit is contained in:
Soumya 2020-07-31 13:30:31 -07:00 committed by ridiculousfish
parent a2b2bcef6e
commit 56c64281bd

View File

@ -215,9 +215,10 @@ int main () {
check_cxx_source_compiles("
#include <atomic>
#include <cstdint>
std::atomic<uint64_t> x;
std::atomic<uint64_t> x (0);
int main() {
return x;
uint64_t i = x.load(std::memory_order_relaxed);
return std::atomic_is_lock_free(&x);
}"
LIBATOMIC_NOT_NEEDED)
IF (NOT LIBATOMIC_NOT_NEEDED)