Index: mlir/lib/CMakeLists.txt =================================================================== --- mlir/lib/CMakeLists.txt +++ mlir/lib/CMakeLists.txt @@ -15,8 +15,4 @@ add_subdirectory(Target) add_subdirectory(Tools) add_subdirectory(Transforms) - -# Only enable the ExecutionEngine if the native target is configured in. -if(TARGET ${LLVM_NATIVE_ARCH}) - add_subdirectory(ExecutionEngine) -endif() +add_subdirectory(ExecutionEngine) Index: mlir/lib/ExecutionEngine/CMakeLists.txt =================================================================== --- mlir/lib/ExecutionEngine/CMakeLists.txt +++ mlir/lib/ExecutionEngine/CMakeLists.txt @@ -13,16 +13,6 @@ JitRunner.cpp ) -if(LLVM_USE_INTEL_JITEVENTS) - set(LLVM_JIT_LISTENER_LIB - IntelJITEvents) -endif(LLVM_USE_INTEL_JITEVENTS) - -if(LLVM_USE_PERF) - set(LLVM_JIT_LISTENER_LIB - PerfJITEvents) -endif(LLVM_USE_PERF) - # Use a separate library for OptUtils, to avoid pulling in the entire JIT and # codegen infrastructure. Unlike MLIRExecutionEngine, this is part of # libMLIR.so. @@ -48,6 +38,21 @@ Passes ) +# Only enable the ExecutionEngine if the native target is configured in. +if(NOT TARGET ${LLVM_NATIVE_ARCH}) + return() +endif() + +if(LLVM_USE_INTEL_JITEVENTS) + set(LLVM_JIT_LISTENER_LIB + IntelJITEvents) +endif(LLVM_USE_INTEL_JITEVENTS) + +if(LLVM_USE_PERF) + set(LLVM_JIT_LISTENER_LIB + PerfJITEvents) +endif(LLVM_USE_PERF) + add_mlir_library(MLIRExecutionEngine ExecutionEngine.cpp