add_library(mir_core STATIC
  MIRContext.cpp
  MIRFunction.cpp
  MIRBasicBlock.cpp
  MIRInstr.cpp
  Register.cpp
  Lowering.cpp
  RegAlloc.cpp
  FrameLowering.cpp
  AsmPrinter.cpp
)

target_link_libraries(mir_core PUBLIC
  build_options
  ir
)

add_subdirectory(passes)

add_library(mir INTERFACE)
target_link_libraries(mir INTERFACE
  mir_core
  mir_passes
)
