[Mlir-commits] [mlir] 9a8f296 - [mlir] Hotfix - Fix Windows build
Nicolas Vasilache
llvmlistbot at llvm.org
Tue Mar 3 06:34:39 PST 2020
Author: Nicolas Vasilache
Date: 2020-03-03T09:27:33-05:00
New Revision: 9a8f2965f623cbe8afeac5ce821ad8a2f899cee9
URL: https://github.com/llvm/llvm-project/commit/9a8f2965f623cbe8afeac5ce821ad8a2f899cee9
DIFF: https://github.com/llvm/llvm-project/commit/9a8f2965f623cbe8afeac5ce821ad8a2f899cee9.diff
LOG: [mlir] Hotfix - Fix Windows build
This revision adds a static `mlir_c_runner_utils_static` library
for the sole purpose of being linked into `mlir_runner_utils` on
Windows.
It was previously reported that:
```
`add_llvm_library(mlir_c_runner_utils SHARED CRunnerUtils.cpp)`
produces *only* a dll on windows, the linking of mlir_runner_utils fails
because target_link_libraries is looking for a .lib file as opposed to a
.dll file. I think this may be a case where either we need to use
LINK_LIBS or explicitly build a static lib as well, but I haven't tried
either yet.
```
Added:
Modified:
mlir/lib/ExecutionEngine/CMakeLists.txt
Removed:
################################################################################
diff --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt
index dc20e5fd4622..37df71642440 100644
--- a/mlir/lib/ExecutionEngine/CMakeLists.txt
+++ b/mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -36,11 +36,12 @@ target_link_libraries(MLIRExecutionEngine
${outlibs})
add_llvm_library(mlir_c_runner_utils SHARED CRunnerUtils.cpp)
+add_llvm_library(mlir_c_runner_utils_static CRunnerUtils.cpp)
target_compile_definitions(mlir_c_runner_utils PRIVATE mlir_c_runner_utils_EXPORTS)
add_llvm_library(mlir_runner_utils SHARED RunnerUtils.cpp)
target_link_libraries(mlir_runner_utils
- mlir_c_runner_utils
+ mlir_c_runner_utils_static
)
target_compile_definitions(mlir_runner_utils PRIVATE mlir_runner_utils_EXPORTS)
More information about the Mlir-commits
mailing list