Generally:
1) don't use target_link_libraries() and add_mlir_library() on the same target, use LINK_LIBS PUBLIC instead.
2) don't use LINK_LIBS to specify LLVM libraries. Use LINK_COMPONENTS instead
3) no need to link against LLVMSupport. We pull it in by default.
Differential Revision: https://reviews.llvm.org/D80076
DEPENDS
MLIRConversionPassIncGen
+ LINK_COMPONENTS
+ Core
+
LINK_LIBS PUBLIC
MLIREDSC
MLIRIR
MLIRPass
MLIRSCF
MLIRTransforms
- LLVMCore
- LLVMSupport
)
MLIRIR
MLIRPass
MLIRStandardOps
- MLIRSupport
MLIRTransforms
- LLVMSupport
)
Core
OrcJIT
JITLink
- Support
LINK_LIBS PUBLIC
MLIRExecutionEngine
LINK_LIBS PUBLIC
MLIRSupport
- LLVMSupport
)
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Support
- LINK_COMPONENTS
- Support
-
LINK_LIBS PUBLIC
${LLVM_PTHREAD_LIB})
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Support
- LINK_COMPONENTS
- Support
-
LINK_LIBS PUBLIC
MLIRPass
MLIRParser