[Mlir-commits] [mlir] c310840 - [mlir][nfc] Fix building mlir_c_runner_utils for Windows
River Riddle
llvmlistbot at llvm.org
Fri Mar 6 22:53:28 PST 2020
Author: Mason Remy
Date: 2020-03-06T22:44:45-08:00
New Revision: c3108404c19a6472df4dd8dd5132d5b29f97cd05
URL: https://github.com/llvm/llvm-project/commit/c3108404c19a6472df4dd8dd5132d5b29f97cd05
DIFF: https://github.com/llvm/llvm-project/commit/c3108404c19a6472df4dd8dd5132d5b29f97cd05.diff
LOG: [mlir][nfc] Fix building mlir_c_runner_utils for Windows
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
Added:
Modified:
mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
mlir/lib/ExecutionEngine/CRunnerUtils.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h b/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
index f63d310f2fc9..0d3b765e546a 100644
--- a/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
+++ b/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
@@ -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();
diff --git a/mlir/lib/ExecutionEngine/CRunnerUtils.cpp b/mlir/lib/ExecutionEngine/CRunnerUtils.cpp
index a57958c66000..7faf3f9d4243 100644
--- a/mlir/lib/ExecutionEngine/CRunnerUtils.cpp
+++ b/mlir/lib/ExecutionEngine/CRunnerUtils.cpp
@@ -12,6 +12,8 @@
//
//===----------------------------------------------------------------------===//
+#include "mlir/ExecutionEngine/CRunnerUtils.h"
+
#include <cinttypes>
#include <cstdio>
More information about the Mlir-commits
mailing list