[Mlir-commits] [mlir] 3c4d955 - [mlir] Add lib to tests for shared build (#88574)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Apr 14 06:36:44 PDT 2024
Author: Jacques Pienaar
Date: 2024-04-14T06:36:40-07:00
New Revision: 3c4d9559495e60dcbb431ab80d806096559a7486
URL: https://github.com/llvm/llvm-project/commit/3c4d9559495e60dcbb431ab80d806096559a7486
DIFF: https://github.com/llvm/llvm-project/commit/3c4d9559495e60dcbb431ab80d806096559a7486.diff
LOG: [mlir] Add lib to tests for shared build (#88574)
These resulted in link failures:
```
/usr/bin/ld:
tools/mlir/test/CAPI/CMakeFiles/mlir-capi-translation-test.dir/translation.c.o:
in function `main':
translation.c:(.text.main+0x58): undefined reference to
`LLVMContextCreate'
/usr/bin/ld: translation.c:(.text.main+0x9b): undefined reference to
`LLVMDumpModule'
/usr/bin/ld: translation.c:(.text.main+0xa3): undefined reference to
`LLVMDisposeModule'
/usr/bin/ld: translation.c:(.text.main+0xb3): undefined reference to
`LLVMContextDispose'
```
Found in mlir-hs. Not sure why this hasn't been flagged elsewhere.
Added:
Modified:
mlir/test/CAPI/CMakeLists.txt
Removed:
################################################################################
diff --git a/mlir/test/CAPI/CMakeLists.txt b/mlir/test/CAPI/CMakeLists.txt
index 79b61fdef38b49..b9cd63ef7c673d 100644
--- a/mlir/test/CAPI/CMakeLists.txt
+++ b/mlir/test/CAPI/CMakeLists.txt
@@ -12,6 +12,7 @@ function(_add_capi_test_executable name)
llvm_update_compile_flags(${name})
if(MLIR_BUILD_MLIR_C_DYLIB)
target_link_libraries(${name} PRIVATE
+ LLVMCore
MLIR-C)
else()
target_link_libraries(${name} PRIVATE
More information about the Mlir-commits
mailing list