diff --git a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel index 268820970039..47222860ea49 100644 --- a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel @@ -138,6 +138,7 @@ expand_template( # Defaults that could be configurable if needed "#cmakedefine01 LLDB_ENABLE_POSIX": "#define LLDB_ENABLE_POSIX 1", + "#cmakedefine01 LLDB_ENABLE_PROTOCOL_SERVERS": "#define LLDB_ENABLE_PROTOCOL_SERVERS 1", "#cmakedefine LLDB_GLOBAL_INIT_DIRECTORY R\"(${LLDB_GLOBAL_INIT_DIRECTORY})\"": "#define LLDB_GLOBAL_INIT_DIRECTORY \"\"", "${LLDB_INSTALL_LIBDIR_BASENAME}": "lib", "${LLDB_BUG_REPORT_URL}": "", @@ -757,6 +758,27 @@ cc_library( includes = ["include"], ) +cc_library( + name = "ProtocolHeaders", + hdrs = glob(["include/lldb/Protocol/**/*.h"]), + includes = ["include"], + deps = [ + ":Headers", + "//llvm:Telemetry", + ], +) + +cc_library( + name = "ProtocolMCP", + srcs = glob(["source/Protocol/MCP/*.cpp"]), + deps = [ + ":Host", + ":ProtocolHeaders", + ":Utility", + "//llvm:Support", + ], +) + cc_library( name = "Utility", srcs = glob(["source/Utility/**/*.cpp"]), diff --git a/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel b/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel index 769f9f8bf993..830fe47da20d 100644 --- a/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel @@ -136,6 +136,22 @@ cc_library( ], ) +cc_library( + name = "PluginProtocolServerMCP", + srcs = glob(["Protocol/MCP/*.cpp"]), + hdrs = glob(["Protocol/MCP/*.h"]), + deps = [ + "//lldb:CoreHeaders", + "//lldb:Headers", + "//lldb:Host", + "//lldb:InterpreterHeaders", + "//lldb:ProtocolHeaders", + "//lldb:ProtocolMCP", + "//lldb:Utility", + "//llvm:Support", + ], +) + cc_library( name = "PluginTypeSystemClang", srcs = glob(["TypeSystem/Clang/*.cpp"]), diff --git a/utils/bazel/llvm-project-overlay/lldb/source/Plugins/plugin_config.bzl b/utils/bazel/llvm-project-overlay/lldb/source/Plugins/plugin_config.bzl index 2a8bba52c2a6..acbbb6f440c8 100644 --- a/utils/bazel/llvm-project-overlay/lldb/source/Plugins/plugin_config.bzl +++ b/utils/bazel/llvm-project-overlay/lldb/source/Plugins/plugin_config.bzl @@ -71,6 +71,7 @@ DEFAULT_PLUGINS = [ "ProcessElfCore", "ProcessMachCore", "ProcessMinidump", + "ProtocolServerMCP", "RegisterTypeBuilderClang", "ScriptedProcess", "StructuredDataDarwinLog",