diff --git a/compiler-rt/test/CMakeLists.txt b/compiler-rt/test/CMakeLists.txt --- a/compiler-rt/test/CMakeLists.txt +++ b/compiler-rt/test/CMakeLists.txt @@ -27,6 +27,10 @@ list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS KillTheDoctor) endif() endif() + # Tests use C++ standard library headers. + if (TARGET cxx-headers OR HAVE_LIBCXX) + set(SANITIZER_COMMON_LIT_TEST_DEPS cxx-headers) + endif() endif() function(compiler_rt_test_runtime runtime)