Index: cmake/Modules/CompilerRTCompile.cmake =================================================================== --- cmake/Modules/CompilerRTCompile.cmake +++ cmake/Modules/CompilerRTCompile.cmake @@ -136,7 +136,7 @@ COMMAND bash -c "${CMD}" COMMENT "Checking that just-built clang can find C++ headers..." VERBATIM) - if (TARGET clang) + if (NOT COMPILER_RT_STANDALONE_BUILD) ADD_DEPENDENCIES(CompilerRTUnitTestCheckCxx clang) endif() endif()