Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aa7faec

Browse files
authored
[bazel] Build mcp server for lldb (#178437)
1 parent cc2b48f commit aa7faec

3 files changed

Lines changed: 39 additions & 0 deletions

File tree

utils/bazel/llvm-project-overlay/lldb/BUILD.bazel

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ expand_template(
138138

139139
# Defaults that could be configurable if needed
140140
"#cmakedefine01 LLDB_ENABLE_POSIX": "#define LLDB_ENABLE_POSIX 1",
141+
"#cmakedefine01 LLDB_ENABLE_PROTOCOL_SERVERS": "#define LLDB_ENABLE_PROTOCOL_SERVERS 1",
141142
"#cmakedefine LLDB_GLOBAL_INIT_DIRECTORY R\"(${LLDB_GLOBAL_INIT_DIRECTORY})\"": "#define LLDB_GLOBAL_INIT_DIRECTORY \"\"",
142143
"${LLDB_INSTALL_LIBDIR_BASENAME}": "lib",
143144
"${LLDB_BUG_REPORT_URL}": "",
@@ -757,6 +758,27 @@ cc_library(
757758
includes = ["include"],
758759
)
759760

761+
cc_library(
762+
name = "ProtocolHeaders",
763+
hdrs = glob(["include/lldb/Protocol/**/*.h"]),
764+
includes = ["include"],
765+
deps = [
766+
":Headers",
767+
"//llvm:Telemetry",
768+
],
769+
)
770+
771+
cc_library(
772+
name = "ProtocolMCP",
773+
srcs = glob(["source/Protocol/MCP/*.cpp"]),
774+
deps = [
775+
":Host",
776+
":ProtocolHeaders",
777+
":Utility",
778+
"//llvm:Support",
779+
],
780+
)
781+
760782
cc_library(
761783
name = "Utility",
762784
srcs = glob(["source/Utility/**/*.cpp"]),

utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,22 @@ cc_library(
136136
],
137137
)
138138

139+
cc_library(
140+
name = "PluginProtocolServerMCP",
141+
srcs = glob(["Protocol/MCP/*.cpp"]),
142+
hdrs = glob(["Protocol/MCP/*.h"]),
143+
deps = [
144+
"//lldb:CoreHeaders",
145+
"//lldb:Headers",
146+
"//lldb:Host",
147+
"//lldb:InterpreterHeaders",
148+
"//lldb:ProtocolHeaders",
149+
"//lldb:ProtocolMCP",
150+
"//lldb:Utility",
151+
"//llvm:Support",
152+
],
153+
)
154+
139155
cc_library(
140156
name = "PluginTypeSystemClang",
141157
srcs = glob(["TypeSystem/Clang/*.cpp"]),

utils/bazel/llvm-project-overlay/lldb/source/Plugins/plugin_config.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ DEFAULT_PLUGINS = [
7171
"ProcessElfCore",
7272
"ProcessMachCore",
7373
"ProcessMinidump",
74+
"ProtocolServerMCP",
7475
"RegisterTypeBuilderClang",
7576
"ScriptedProcess",
7677
"StructuredDataDarwinLog",

0 commit comments

Comments
 (0)