Fix build when no native target is enabled

The JITTests and MCJITTests unit test targets require a native arch with JIT
support, otherwise fail to link.

llvm-svn: 210411
This commit is contained in:
Alp Toker 2014-06-08 02:45:56 +00:00
parent 9fe25f35fe
commit 7bfa48b10b
1 changed files with 4 additions and 3 deletions

View File

@ -9,9 +9,10 @@ add_llvm_unittest(ExecutionEngineTests
ExecutionEngineTest.cpp
)
# Include JIT/MCJIT tests only if native arch is a JIT target.
list(FIND LLVM_TARGETS_WITH_JIT "${LLVM_NATIVE_ARCH}" have_jit)
if (NOT have_jit EQUAL -1 )
# Include JIT/MCJIT tests only if native arch is a built JIT target.
list(FIND LLVM_TARGETS_TO_BUILD "${LLVM_NATIVE_ARCH}" build_idx)
list(FIND LLVM_TARGETS_WITH_JIT "${LLVM_NATIVE_ARCH}" jit_idx)
if (NOT build_idx LESS 0 AND NOT jit_idx LESS 0)
add_subdirectory(JIT)
add_subdirectory(MCJIT)
endif()