Index: mlir/tools/mlir-cpu-runner/CMakeLists.txt =================================================================== --- mlir/tools/mlir-cpu-runner/CMakeLists.txt +++ mlir/tools/mlir-cpu-runner/CMakeLists.txt @@ -16,7 +16,12 @@ MLIRSupport LLVMCore LLVMSupport - LLVMX86CodeGen - LLVMX86Desc - LLVMX86Info ) + +if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD) + target_link_libraries(mlir-cpu-runner PRIVATE + LLVMX86CodeGen + LLVMX86Desc + LLVMX86Info + ) +endif() \ No newline at end of file