Files
clang-p2996/flang/lib/Optimizer/HLFIR/Transforms/CMakeLists.txt
Michał Górny 6a2cc12229 [flang] Support linking to MLIR dylib (#120966)
Introduce a new `MLIR_LIBS` argument to `add_flang_library`, that uses
`mlir_target_link_libraries` to link the MLIR dylib alterantively to the
component libraries. Use it, along with a few inline
`mlir_target_link_libraries` in tools, to support linking Flang to MLIR
dylib rather than the static libraries.

With these changes, the vast majority of Flang can be linked
dynamically. The only parts still using static libraries are these
requiring MLIR test libraries, that are not included in the dylib.
2025-01-16 13:35:26 +00:00

40 lines
661 B
CMake

get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
add_flang_library(HLFIRTransforms
BufferizeHLFIR.cpp
ConvertToFIR.cpp
InlineElementals.cpp
InlineHLFIRAssign.cpp
LowerHLFIRIntrinsics.cpp
LowerHLFIROrderedAssignments.cpp
ScheduleOrderedAssignments.cpp
SimplifyHLFIRIntrinsics.cpp
OptimizedBufferization.cpp
DEPENDS
CUFAttrsIncGen
FIRDialect
HLFIROpsIncGen
${dialect_libs}
LINK_LIBS
CUFAttrs
FIRAnalysis
FIRDialect
FIRBuilder
FIRDialectSupport
FIRSupport
FIRTransforms
FlangOpenMPTransforms
HLFIRDialect
LINK_COMPONENTS
AsmParser
AsmPrinter
Remarks
MLIR_LIBS
MLIRIR
${dialect_libs}
)