forked from OSchip/llvm-project
[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:
parent
f88c7fe46b
commit
37ce8d6ade
|
@ -7,6 +7,9 @@ add_mlir_conversion_library(MLIRLinalgToStandard
|
||||||
DEPENDS
|
DEPENDS
|
||||||
MLIRConversionPassIncGen
|
MLIRConversionPassIncGen
|
||||||
|
|
||||||
|
LINK_COMPONENTS
|
||||||
|
Core
|
||||||
|
|
||||||
LINK_LIBS PUBLIC
|
LINK_LIBS PUBLIC
|
||||||
MLIREDSC
|
MLIREDSC
|
||||||
MLIRIR
|
MLIRIR
|
||||||
|
@ -14,6 +17,4 @@ add_mlir_conversion_library(MLIRLinalgToStandard
|
||||||
MLIRPass
|
MLIRPass
|
||||||
MLIRSCF
|
MLIRSCF
|
||||||
MLIRTransforms
|
MLIRTransforms
|
||||||
LLVMCore
|
|
||||||
LLVMSupport
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -12,7 +12,5 @@ add_mlir_dialect_library(MLIRStandardOpsTransforms
|
||||||
MLIRIR
|
MLIRIR
|
||||||
MLIRPass
|
MLIRPass
|
||||||
MLIRStandardOps
|
MLIRStandardOps
|
||||||
MLIRSupport
|
|
||||||
MLIRTransforms
|
MLIRTransforms
|
||||||
LLVMSupport
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -55,7 +55,6 @@ add_mlir_library(MLIRJitRunner
|
||||||
Core
|
Core
|
||||||
OrcJIT
|
OrcJIT
|
||||||
JITLink
|
JITLink
|
||||||
Support
|
|
||||||
|
|
||||||
LINK_LIBS PUBLIC
|
LINK_LIBS PUBLIC
|
||||||
MLIRExecutionEngine
|
MLIRExecutionEngine
|
||||||
|
|
|
@ -36,5 +36,4 @@ add_mlir_library(MLIRIR
|
||||||
|
|
||||||
LINK_LIBS PUBLIC
|
LINK_LIBS PUBLIC
|
||||||
MLIRSupport
|
MLIRSupport
|
||||||
LLVMSupport
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -13,9 +13,6 @@ add_mlir_library(MLIRSupport
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Support
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Support
|
||||||
|
|
||||||
LINK_COMPONENTS
|
|
||||||
Support
|
|
||||||
|
|
||||||
LINK_LIBS PUBLIC
|
LINK_LIBS PUBLIC
|
||||||
${LLVM_PTHREAD_LIB})
|
${LLVM_PTHREAD_LIB})
|
||||||
|
|
||||||
|
@ -25,9 +22,6 @@ add_mlir_library(MLIROptLib
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Support
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Support
|
||||||
|
|
||||||
LINK_COMPONENTS
|
|
||||||
Support
|
|
||||||
|
|
||||||
LINK_LIBS PUBLIC
|
LINK_LIBS PUBLIC
|
||||||
MLIRPass
|
MLIRPass
|
||||||
MLIRParser
|
MLIRParser
|
||||||
|
|
Loading…
Reference in New Issue