49 lines · plain
1# This library is unusual, since mlir-tblgen depends on it, which is2# built with DISABLE_LLVM_LINK_LLVM_DYLIB, this must also be built3# with that option. Otherwise builds with LLVM_BUILD_LLVM_DYLIB and4# LLVM_LINK_LLVM_DYLIB fail. (Note that even if this has no llvm5# component dependencies, LLVM_LINK_LLVM_DYLIB tends to introduce a6# dependence on libLLVM.so) However, it must also be linkable against7# libMLIR.so in some contexts (see unittests/Tablegen, for instance, which8# has a dependence on MLIRIR, which must depend on libLLVM.so). This works9# in this special case because this library is static.10#11# In order for this arrangement to be sound, it must not depend on libraries12# that may be transitively included in libMLIR.so or libLLVM.so. Specifically,13# this means that MLIRSupport (outside of header-only access) cannot be used.14llvm_add_library(MLIRTableGen STATIC15 Argument.cpp16 Attribute.cpp17 AttrOrTypeDef.cpp18 Builder.cpp19 Class.cpp20 CodeGenHelpers.cpp21 Constraint.cpp22 Dialect.cpp23 EnumInfo.cpp24 Format.cpp25 GenInfo.cpp26 Interfaces.cpp27 Operator.cpp28 Pass.cpp29 Pattern.cpp30 Predicate.cpp31 Property.cpp32 Region.cpp33 SideEffects.cpp34 Successor.cpp35 Trait.cpp36 Type.cpp37 38 DISABLE_LLVM_LINK_LLVM_DYLIB39 40 ADDITIONAL_HEADER_DIRS41 ${MLIR_MAIN_INCLUDE_DIR}/mlir/TableGen42 ${MLIR_MAIN_INCLUDE_DIR}/mlir/Support43)44set_target_properties(MLIRTableGen PROPERTIES FOLDER "MLIR/Tablegenning")45 46mlir_check_all_link_libraries(MLIRTableGen)47 48add_mlir_library_install(MLIRTableGen)49