Browse Source

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 <StormByte@gmail.com>
StormBytePP 4 months ago
parent
commit
10720bea49
1 changed files with 2 additions and 1 deletions
  1. 2 1
      CMakeLists.txt

+ 2 - 1
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)