Add a VM to EmitC conversion and CModule Target (#2536) Makes first progress on #1173: * Defines `IREE_HAVE_EMITC_DIALECT` to enable conditional builds, which are CMake only so far * Enables the EmitC dialect in iree-opt and iree-translate * Adds a VMToEmitC conversion (test) pass * Adds a C target to the VM So far an empty file is written. In a follow up, we will implement EmitC -> textual C, (re)using EmitC's CppTarget within the CModule target. Co-authored-by: Simon Camphausen <simon.camphausen@iml.fraunhofer.de>
diff --git a/build_tools/cmake/iree_copts.cmake b/build_tools/cmake/iree_copts.cmake index c39db21..7563c1f 100644 --- a/build_tools/cmake/iree_copts.cmake +++ b/build_tools/cmake/iree_copts.cmake
@@ -250,3 +250,15 @@ ${PROJECT_BINARY_DIR}/build_tools/third_party/tensorflow ${PROJECT_BINARY_DIR}/build_tools/third_party/tensorflow/tensorflow/compiler/mlir/hlo/include/ ) + +#------------------------------------------------------------------------------- +# Third party: mlir-emitc +#------------------------------------------------------------------------------- + +if(IREE_ENABLE_EMITC) + list(APPEND IREE_COMMON_INCLUDE_DIRS + ${PROJECT_SOURCE_DIR}/third_party/mlir-emitc/include + ${PROJECT_BINARY_DIR}/third_party/mlir-emitc/include + ) + add_definitions(-DIREE_HAVE_EMITC_DIALECT) +endif()