diff --git a/compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt index 8a3c4cde047b..039ad483c704 100644 --- a/compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt +++ b/compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt @@ -23,6 +23,8 @@ foreach(lib ${SANITIZER_TEST_CXX_LIBRARIES}) list(APPEND LINK_FLAGS -l${lib}) endforeach() list(APPEND LINK_FLAGS -pthread) +# Linking against libatomic is required with some compilers +list(APPEND LINK_FLAGS -latomic) set(SCUDO_TEST_HEADERS) foreach (header ${SCUDO_HEADERS})