[PATCH] D80076: [MLIR] Fix linkage for libMLIR.so
Stephen Neuendorffer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 16 23:19:55 PDT 2020
stephenneuendorffer created this revision.
Herald added subscribers: llvm-commits, jurahul, Kayjukh, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini, mgorny.
Herald added a reviewer: rriddle.
Herald added a project: LLVM.
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.
Depends on D80075 <https://reviews.llvm.org/D80075>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80076
Files:
mlir/lib/Conversion/LinalgToStandard/CMakeLists.txt
mlir/lib/Dialect/StandardOps/Transforms/CMakeLists.txt
mlir/lib/ExecutionEngine/CMakeLists.txt
mlir/lib/IR/CMakeLists.txt
mlir/lib/Support/CMakeLists.txt
Index: mlir/lib/Support/CMakeLists.txt
===================================================================
--- mlir/lib/Support/CMakeLists.txt
+++ mlir/lib/Support/CMakeLists.txt
@@ -13,9 +13,6 @@
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Support
- LINK_COMPONENTS
- Support
-
LINK_LIBS PUBLIC
${LLVM_PTHREAD_LIB})
@@ -25,9 +22,6 @@
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Support
- LINK_COMPONENTS
- Support
-
LINK_LIBS PUBLIC
MLIRPass
MLIRParser
Index: mlir/lib/IR/CMakeLists.txt
===================================================================
--- mlir/lib/IR/CMakeLists.txt
+++ mlir/lib/IR/CMakeLists.txt
@@ -36,5 +36,4 @@
LINK_LIBS PUBLIC
MLIRSupport
- LLVMSupport
)
Index: mlir/lib/ExecutionEngine/CMakeLists.txt
===================================================================
--- mlir/lib/ExecutionEngine/CMakeLists.txt
+++ mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -55,7 +55,6 @@
Core
OrcJIT
JITLink
- Support
LINK_LIBS PUBLIC
MLIRExecutionEngine
Index: mlir/lib/Dialect/StandardOps/Transforms/CMakeLists.txt
===================================================================
--- mlir/lib/Dialect/StandardOps/Transforms/CMakeLists.txt
+++ mlir/lib/Dialect/StandardOps/Transforms/CMakeLists.txt
@@ -12,7 +12,5 @@
MLIRIR
MLIRPass
MLIRStandardOps
- MLIRSupport
MLIRTransforms
- LLVMSupport
)
Index: mlir/lib/Conversion/LinalgToStandard/CMakeLists.txt
===================================================================
--- mlir/lib/Conversion/LinalgToStandard/CMakeLists.txt
+++ mlir/lib/Conversion/LinalgToStandard/CMakeLists.txt
@@ -7,6 +7,9 @@
DEPENDS
MLIRConversionPassIncGen
+ LINK_COMPONENTS
+ Core
+
LINK_LIBS PUBLIC
MLIREDSC
MLIRIR
@@ -14,6 +17,4 @@
MLIRPass
MLIRSCF
MLIRTransforms
- LLVMCore
- LLVMSupport
)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80076.264476.patch
Type: text/x-patch
Size: 1872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200517/3a4430d1/attachment.bin>
More information about the llvm-commits
mailing list