Skip to content

Commit 3d2a9bb

Browse files
committed
Replace comments with a note in EXCLUDE_FROM_LIBMLIR doc
1 parent 88e5633 commit 3d2a9bb

File tree

4 files changed

+3
-13
lines changed

4 files changed

+3
-13
lines changed

mlir/cmake/modules/AddMLIR.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@ endfunction()
305305
# EXCLUDE_FROM_LIBMLIR
306306
# Don't include this library in libMLIR.so. This option should be used
307307
# for test libraries, executable-specific libraries, or rarely used libraries
308-
# with large dependencies.
308+
# with large dependencies. When using it, please link libraries included
309+
# in libMLIR via mlir_target_link_libraries(), to ensure that the library
310+
# does not pull in static dependencies when MLIR_LINK_MLIR_DYLIB=ON is used.
309311
# OBJECT
310312
# The library's object library is referenced using "obj.${name}". For this to
311313
# work reliably, this flag ensures that the OBJECT library exists.

mlir/test/lib/Analysis/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ add_mlir_library(MLIRTestAnalysis
2323
LINK_LIBS PUBLIC
2424
MLIRTestDialect
2525
)
26-
27-
# Since this library is excluded from libMLIR, link it to the dylib
28-
# to ensure that it can be used in flang without implicitly pulling in
29-
# static libraries.
3026
mlir_target_link_libraries(MLIRTestAnalysis PUBLIC
3127
MLIRAffineDialect
3228
MLIRAnalysis

mlir/test/lib/Dialect/Test/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ add_mlir_library(MLIRTestDialect
6969
MLIRTestOpsSyntaxIncGen
7070
MLIRTestOpsShardGen
7171
)
72-
73-
# Since this library is excluded from libMLIR, link it to the dylib
74-
# to ensure that it can be used in flang without implicitly pulling in
75-
# static libraries.
7672
mlir_target_link_libraries(MLIRTestDialect PUBLIC
7773
MLIRControlFlowInterfaces
7874
MLIRDataLayoutInterfaces

mlir/test/lib/IR/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ add_mlir_library(MLIRTestIR
2828

2929
EXCLUDE_FROM_LIBMLIR
3030
)
31-
32-
# Since this library is excluded from libMLIR, link it to the dylib
33-
# to ensure that it can be used in flang without implicitly pulling in
34-
# static libraries.
3531
mlir_target_link_libraries(MLIRTestIR PUBLIC
3632
MLIRPass
3733
MLIRBytecodeReader

0 commit comments

Comments
 (0)