• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This library is unusual, since mlir-tblgen depends on it, which is
2# built with DISABLE_LLVM_LINK_LLVM_DYLIB, this must also be built
3# with that option.  Otherwise builds with LLVM_BUILD_LLVM_DYLIB and
4# LLVM_LINK_LLVM_DYLIB fail.  (Note that even if this has no llvm
5# component dependencies, LLVM_LINK_LLVM_DYLIB tends to introduce a
6# dependence on libLLVM.so)  However, it must also be linkable against
7# libMLIR.so in some contexts (see unittests/Tablegen, for instance, which
8# has a dependence on MLIRIR, which must depend on libLLVM.so).  This works
9# in this special case because this library is static.
10
11llvm_add_library(MLIRTableGen STATIC
12  Argument.cpp
13  Attribute.cpp
14  Constraint.cpp
15  Dialect.cpp
16  Format.cpp
17  Interfaces.cpp
18  Operator.cpp
19  OpClass.cpp
20  OpTrait.cpp
21  Pass.cpp
22  Pattern.cpp
23  Predicate.cpp
24  Region.cpp
25  SideEffects.cpp
26  Successor.cpp
27  Type.cpp
28  TypeDef.cpp
29
30  DISABLE_LLVM_LINK_LLVM_DYLIB
31
32  ADDITIONAL_HEADER_DIRS
33  ${MLIR_MAIN_INCLUDE_DIR}/mlir/TableGen
34)
35
36mlir_check_all_link_libraries(MLIRTableGen)
37
38add_mlir_library_install(MLIRTableGen)
39