You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CMake: Do not specify LLVMSupport in LINK_LIBS. (#2575)
This is a new take on #2573.
There, I was trying to fix CMake errors in the external build, with the
error message saying that `LINK_COMPONENTS` should be used instead of
`LINK_LIBS` for LLVM libraries. That change fixed my external build, but
broke the standalone build on CI.
Reading the `AddMLIR.cmake` code generating the error, I came across
this line:
https://github.com/llvm/llvm-project/blob/ee4dd147baff8f971f3ec5aad5a216ca9837a732/mlir/cmake/modules/AddMLIR.cmake#L287-L288
```cmake
# MLIR libraries uniformly depend on LLVMSupport. Just specify it once here.
list(APPEND ARG_LINK_COMPONENTS Support)
```
This looks like hardcoding always depending on `LLVMSupport` (though I
wasn't quite sure about the nuance between `Support` and `LLVMSupport`).
If that's correct, then we never needed specifying `LLVMSupport` in the
first place. So I tried just omitting it, and that seems to work. WDYT?
---------
Signed-off-by: Benoit Jacob <[email protected]>
0 commit comments