Transforms will need to be put in a different library to avoid circular
dependencies with other parts of the compiler. So create an IR
directory, this (flat include directory, IR and Transform directories in
lib) matches how dialects like LLVM dialect are implemented.
Differential Revision: https://reviews.llvm.org/D137701
-get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
-
-add_flang_library(HLFIRDialect
- HLFIRDialect.cpp
-
- DEPENDS
- FIRDialect
- HLFIROpsIncGen
- ${dialect_libs}
-
- LINK_LIBS
- FIRDialect
- MLIRIR
- ${dialect_libs}
-
- LINK_COMPONENTS
- AsmParser
- AsmPrinter
- Remarks
-)
+add_subdirectory(IR)
--- /dev/null
+get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
+
+add_flang_library(HLFIRDialect
+ HLFIRDialect.cpp
+
+ DEPENDS
+ FIRDialect
+ HLFIROpsIncGen
+ ${dialect_libs}
+
+ LINK_LIBS
+ FIRDialect
+ MLIRIR
+ ${dialect_libs}
+
+ LINK_COMPONENTS
+ AsmParser
+ AsmPrinter
+ Remarks
+)