Proper dependency check for clang in compiler_rt.

- Not having a dependency does not work in standalone build, as Clang does not exist.
 - if (TARGET clang) check is useless, as it is order-dependent,
   and Clang may not be registered yet.

Differential Revision: https://reviews.llvm.org/D37228

llvm-svn: 311911
This commit is contained in:
George Karpenkov 2017-08-28 19:39:05 +00:00
parent f32ec1ab31
commit 16a05f2dfe
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ macro(clang_compiler_add_cxx_check)
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()