From 10720bea493e9665c1e7548198909c9b6e7119b3 Mon Sep 17 00:00:00 2001 From: StormBytePP Date: Wed, 16 Oct 2024 17:30:56 +0200 Subject: [PATCH] Fix atomic builtins test that currently fails for llvm+compiler_rt when gcc is not present (#18788) Fix atomic builtins test that currently fails for llvm+compiler_rt only systems (no gcc) where atomic are builtin but __atomic_load_8 is not implemented Signed-off-by: David C. Manuelda --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd620901525515..2b629395e60086 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -448,7 +448,8 @@ int main() { check_cxx_source_compiles(" int main() { - __atomic_load_8(nullptr, 0); + int test; + __atomic_load_n(&test, 0); return 0; } " HAVE_BUILTIN_ATOMICS)