[llvm] r210411 - Fix build when no native target is enabled

Alp Toker alp at nuanti.com
Sat Jun 7 19:45:56 PDT 2014


Author: alp
Date: Sat Jun  7 21:45:56 2014
New Revision: 210411

URL: http://llvm.org/viewvc/llvm-project?rev=210411&view=rev
Log:
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.

Modified:
    llvm/trunk/unittests/ExecutionEngine/CMakeLists.txt

Modified: llvm/trunk/unittests/ExecutionEngine/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/CMakeLists.txt?rev=210411&r1=210410&r2=210411&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/CMakeLists.txt (original)
+++ llvm/trunk/unittests/ExecutionEngine/CMakeLists.txt Sat Jun  7 21:45:56 2014
@@ -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()





More information about the llvm-commits mailing list