Index: mlir/include/mlir/ExecutionEngine/CRunnerUtils.h =================================================================== --- mlir/include/mlir/ExecutionEngine/CRunnerUtils.h +++ mlir/include/mlir/ExecutionEngine/CRunnerUtils.h @@ -20,6 +20,7 @@ #ifdef mlir_c_runner_utils_EXPORTS /* We are building this library */ #define MLIR_CRUNNERUTILS_EXPORT __declspec(dllexport) +#define MLIR_CRUNNERUTILS_DEFINE_FUNCTIONS #else /* We are using this library */ #define MLIR_CRUNNERUTILS_EXPORT __declspec(dllimport) @@ -27,6 +28,7 @@ #endif // MLIR_CRUNNERUTILS_EXPORT #else #define MLIR_CRUNNERUTILS_EXPORT +#define MLIR_CRUNNERUTILS_DEFINE_FUNCTIONS #endif // _WIN32 #include Index: mlir/lib/ExecutionEngine/CRunnerUtils.cpp =================================================================== --- mlir/lib/ExecutionEngine/CRunnerUtils.cpp +++ mlir/lib/ExecutionEngine/CRunnerUtils.cpp @@ -17,6 +17,8 @@ #include #include +#ifdef MLIR_CRUNNERUTILS_DEFINE_FUNCTIONS + // Small runtime support "lib" for vector.print lowering. // By providing elementary printing methods only, this // library can remain fully unaware of low-level implementation @@ -29,3 +31,5 @@ extern "C" void print_close() { fputs(" )", stdout); } extern "C" void print_comma() { fputs(", ", stdout); } extern "C" void print_newline() { fputc('\n', stdout); } + +#endif