[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.

GitOrigin-RevId: 3c4d9559495e60dcbb431ab80d806096559a7486
1 file changed
tree: 57a98e6f58505d0d8f84705855eb645a59b3bb01
  1. benchmark/
  2. cmake/
  3. docs/
  4. examples/
  5. include/
  6. lib/
  7. python/
  8. test/
  9. tools/
  10. unittests/
  11. utils/
  12. .clang-format
  13. .clang-tidy
  14. CMakeLists.txt
  15. LICENSE.TXT
  16. README.md
README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.