diff --git a/mlir/tools/mlir-lsp-server/CMakeLists.txt b/mlir/tools/mlir-lsp-server/CMakeLists.txt --- a/mlir/tools/mlir-lsp-server/CMakeLists.txt +++ b/mlir/tools/mlir-lsp-server/CMakeLists.txt @@ -17,6 +17,7 @@ MLIRSPIRVTestPasses MLIRTestAnalysis MLIRTestDialect + MLIRTestDynDialect MLIRTestIR MLIRTestPass MLIRTestReducer @@ -27,12 +28,15 @@ endif() set(LIBS - ${dialect_libs} ${conversion_libs} + ${dialect_libs} + ${extension_libs} ${test_libs} + MLIRAffineAnalysis MLIRAnalysis MLIRDialect + MLIRFuncAllExtensions MLIRLspServerLib MLIRParser MLIRPass diff --git a/mlir/tools/mlir-lsp-server/mlir-lsp-server.cpp b/mlir/tools/mlir-lsp-server/mlir-lsp-server.cpp --- a/mlir/tools/mlir-lsp-server/mlir-lsp-server.cpp +++ b/mlir/tools/mlir-lsp-server/mlir-lsp-server.cpp @@ -9,6 +9,7 @@ #include "mlir/IR/Dialect.h" #include "mlir/IR/MLIRContext.h" #include "mlir/InitAllDialects.h" +#include "mlir/InitAllExtensions.h" #include "mlir/Tools/mlir-lsp-server/MlirLspServerMain.h" using namespace mlir; @@ -16,6 +17,7 @@ #ifdef MLIR_INCLUDE_TESTS namespace test { void registerTestDialect(DialectRegistry &); +void registerTestDynDialect(DialectRegistry &); void registerTestTransformDialectExtension(DialectRegistry &); } // namespace test #endif @@ -23,9 +25,12 @@ int main(int argc, char **argv) { DialectRegistry registry; registerAllDialects(registry); + registerAllExtensions(registry); + #ifdef MLIR_INCLUDE_TESTS ::test::registerTestDialect(registry); ::test::registerTestTransformDialectExtension(registry); + ::test::registerTestDynDialect(registry); #endif return failed(MlirLspServerMain(argc, argv, registry)); }