[MLIR] Fix linkage for libMLIR.so

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
This commit is contained in:
Stephen Neuendorffer 2020-05-16 23:01:52 -07:00
parent f88c7fe46b
commit 37ce8d6ade
5 changed files with 3 additions and 12 deletions

View File

@ -7,6 +7,9 @@ add_mlir_conversion_library(MLIRLinalgToStandard
DEPENDS
MLIRConversionPassIncGen
LINK_COMPONENTS
Core
LINK_LIBS PUBLIC
MLIREDSC
MLIRIR
@ -14,6 +17,4 @@ add_mlir_conversion_library(MLIRLinalgToStandard
MLIRPass
MLIRSCF
MLIRTransforms
LLVMCore
LLVMSupport
)

View File

@ -12,7 +12,5 @@ add_mlir_dialect_library(MLIRStandardOpsTransforms
MLIRIR
MLIRPass
MLIRStandardOps
MLIRSupport
MLIRTransforms
LLVMSupport
)

View File

@ -55,7 +55,6 @@ add_mlir_library(MLIRJitRunner
Core
OrcJIT
JITLink
Support
LINK_LIBS PUBLIC
MLIRExecutionEngine

View File

@ -36,5 +36,4 @@ add_mlir_library(MLIRIR
LINK_LIBS PUBLIC
MLIRSupport
LLVMSupport
)

View File

@ -13,9 +13,6 @@ add_mlir_library(MLIRSupport
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Support
LINK_COMPONENTS
Support
LINK_LIBS PUBLIC
${LLVM_PTHREAD_LIB})
@ -25,9 +22,6 @@ add_mlir_library(MLIROptLib
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Support
LINK_COMPONENTS
Support
LINK_LIBS PUBLIC
MLIRPass
MLIRParser