Dialect linker error

Hi all,

After I fixed @65959, my build ran but my pass segfaults with “dialect has no registered attribute printing hook”. I suspected that my dialect was not registered properly, and did some tweaks, now I am getting linker error

/usr/bin/ld: /comp-opt/CMakeFiles/comp-opt.dir/comp-opt.cpp.o: in function mlir::detail::TypeIDResolver<mlir::comp::toylang::ToyLangDialect, void>::resolveTypeID()': include/comp/Dialect/ToyLang/ToyLangDialect.h.inc:27: undefined reference to mlir::detail::TypeIDResolver<mlir::comp::toylang::ToyLangDialect, void>::id’
/usr/bin/ld: tools/compopt/tools/comp-opt/CMakeFiles/comp-opt.dir/comp-opt.cpp.o: in function mlir::MLIRContext::getOrLoadDialect<mlir::comp::toylang::ToyLangDialect>()::{lambda()#1}::operator()() const': mlir/include/mlir/IR/MLIRContext.h:96: undefined reference to mlir::comp::toylang::ToyLangDialect::ToyLangDialect(mlir::MLIRContext*)’

include/comp/Dialect/ToyLang/ToyLangDialect.h.inc:27 is MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::comp::toylang::ToyLangDialect).

Thank you so much in advance!