Skip to content

Commit 3c4d955

Browse files
authored
[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.
1 parent 6e934b7 commit 3c4d955

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mlir/test/CAPI/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function(_add_capi_test_executable name)
1212
llvm_update_compile_flags(${name})
1313
if(MLIR_BUILD_MLIR_C_DYLIB)
1414
target_link_libraries(${name} PRIVATE
15+
LLVMCore
1516
MLIR-C)
1617
else()
1718
target_link_libraries(${name} PRIVATE

0 commit comments

Comments
 (0)