diff --git a/mlir/cmake/modules/AddMLIR.cmake b/mlir/cmake/modules/AddMLIR.cmake --- a/mlir/cmake/modules/AddMLIR.cmake +++ b/mlir/cmake/modules/AddMLIR.cmake @@ -321,18 +321,11 @@ " DEPS = ${_local_deps}\n\n") endforeach() - # Unfortunately need to compile at least one source file, which is hard - # to guarantee, so just always generate one. We generate one vs using the - # LLVM common dummy.cpp because it works better out of tree. - set(_empty_src "${CMAKE_CURRENT_BINARY_DIR}/${name}__empty.cpp") - file(WRITE "${_empty_src}" "typedef int dummy;") - add_mlir_library(${name} ${_libtype} ${ARG_UNPARSED_ARGUMENTS} PARTIAL_SOURCES_INTENDED EXCLUDE_FROM_LIBMLIR - "${_empty_src}" LINK_LIBS PRIVATE ${_deps} ${ARG_PUBLIC_LIBS}