mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
cmake: check for 8-bit atomic operation
Fix building on RISC-V. Closes #8850. Signed-off-by: Raymond Wong <infiwang@pm.me>
This commit is contained in:
parent
1f393c627b
commit
9f98d2ec5d
@ -255,10 +255,13 @@ int main () {
|
|||||||
check_cxx_source_compiles("
|
check_cxx_source_compiles("
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
std::atomic<uint8_t> n8 (0);
|
||||||
std::atomic<uint64_t> n64 (0);
|
std::atomic<uint64_t> n64 (0);
|
||||||
int main() {
|
int main() {
|
||||||
uint64_t i = n64.load(std::memory_order_relaxed);
|
uint8_t i = n8.load(std::memory_order_relaxed);
|
||||||
return std::atomic_is_lock_free(&n64);
|
uint64_t j = n64.load(std::memory_order_relaxed);
|
||||||
|
return std::atomic_is_lock_free(&n8)
|
||||||
|
& std::atomic_is_lock_free(&n64);
|
||||||
}"
|
}"
|
||||||
LIBATOMIC_NOT_NEEDED)
|
LIBATOMIC_NOT_NEEDED)
|
||||||
IF (NOT LIBATOMIC_NOT_NEEDED)
|
IF (NOT LIBATOMIC_NOT_NEEDED)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user