[mlir][nfc] Fix building mlir_c_runner_utils for Windows
authorMason Remy <masonremy@gmail.com>
Sat, 7 Mar 2020 06:42:38 +0000 (22:42 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Sat, 7 Mar 2020 06:44:45 +0000 (22:44 -0800)
Summary:
On Windows, building `mlir_c_runner_utils` doesn't properly export
symbols, thus resulting in an implib not being created, which causes
an error when consuming LLVM from external projects.

Differential Revision: https://reviews.llvm.org/D75769

mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
mlir/lib/ExecutionEngine/CRunnerUtils.cpp

index f63d310..0d3b765 100644 (file)
@@ -167,6 +167,8 @@ struct UnrankedMemRefType {
 //===----------------------------------------------------------------------===//
 // Small runtime support "lib" for vector.print lowering during codegen.
 //===----------------------------------------------------------------------===//
+extern "C" MLIR_CRUNNERUTILS_EXPORT void print_i32(int32_t i);
+extern "C" MLIR_CRUNNERUTILS_EXPORT void print_i64(int64_t l);
 extern "C" MLIR_CRUNNERUTILS_EXPORT void print_f32(float f);
 extern "C" MLIR_CRUNNERUTILS_EXPORT void print_f64(double d);
 extern "C" MLIR_CRUNNERUTILS_EXPORT void print_open();
index a57958c..7faf3f9 100644 (file)
@@ -12,6 +12,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "mlir/ExecutionEngine/CRunnerUtils.h"
+
 #include <cinttypes>
 #include <cstdio>