We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f0b043 commit cf035caCopy full SHA for cf035ca
compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt
@@ -39,7 +39,10 @@ foreach(lib ${SANITIZER_TEST_CXX_LIBRARIES})
39
endforeach()
40
list(APPEND LINK_FLAGS -pthread)
41
# Linking against libatomic is required with some compilers
42
-list(APPEND LINK_FLAGS -latomic)
+check_library_exists(atomic __atomic_load_8 "" COMPILER_RT_HAS_LIBATOMIC)
43
+if (COMPILER_RT_HAS_LIBATOMIC)
44
+ list(APPEND LINK_FLAGS -latomic)
45
+endif()
46
47
set(SCUDO_TEST_HEADERS
48
scudo_unit_test.h
0 commit comments