[llvm] [bazel] Add support for building lldb-dap (PR #96556)
Keith Smiley via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 13:52:32 PDT 2024
https://github.com/keith created https://github.com/llvm/llvm-project/pull/96556
None
>From 366a9aac7b712306b2766c09f60bcf1c094d1d7c Mon Sep 17 00:00:00 2001
From: Keith Smiley <keithbsmiley at gmail.com>
Date: Mon, 24 Jun 2024 20:52:12 +0000
Subject: [PATCH] [bazel] Add support for building lldb-dap
---
.../lldb/tools/lldb-dap/BUILD.bazel | 62 +++++++++++++++++++
1 file changed, 62 insertions(+)
create mode 100644 utils/bazel/llvm-project-overlay/lldb/tools/lldb-dap/BUILD.bazel
diff --git a/utils/bazel/llvm-project-overlay/lldb/tools/lldb-dap/BUILD.bazel b/utils/bazel/llvm-project-overlay/lldb/tools/lldb-dap/BUILD.bazel
new file mode 100644
index 0000000000000..6d3f19098fb45
--- /dev/null
+++ b/utils/bazel/llvm-project-overlay/lldb/tools/lldb-dap/BUILD.bazel
@@ -0,0 +1,62 @@
+# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
+load("//:vars.bzl", "PACKAGE_VERSION")
+load("//mlir:tblgen.bzl", "gentbl_cc_library")
+
+package(
+ default_visibility = ["//visibility:public"],
+ features = ["layering_check"],
+)
+
+licenses(["notice"])
+
+expand_template(
+ name = "plist",
+ out = "lldb-dap-Info.plist",
+ substitutions = {
+ "${LLDB_VERSION}": PACKAGE_VERSION,
+ },
+ template = "lldb-dap-Info.plist.in",
+)
+
+gentbl_cc_library(
+ name = "lldb_dap_opts_gen",
+ strip_include_prefix = ".",
+ tbl_outs = [(
+ ["-gen-opt-parser-defs"],
+ "Options.inc",
+ )],
+ tblgen = "//llvm:llvm-tblgen",
+ td_file = "Options.td",
+ deps = ["//llvm:OptParserTdFiles"],
+)
+
+cc_binary(
+ name = "lldb-dap",
+ srcs = glob([
+ "*.cpp",
+ "*.h",
+ ]),
+ additional_linker_inputs = [
+ ":plist",
+ ],
+ linkopts = select({
+ "@platforms//os:macos": [
+ "-Wl,-sectcreate,__TEXT,__info_plist,$(location :plist)",
+ ],
+ "//conditions:default": [],
+ }),
+ deps = [
+ ":lldb_dap_opts_gen",
+ "//lldb:APIHeaders",
+ "//lldb:Headers",
+ "//lldb:Host",
+ "//lldb:liblldb.wrapper",
+ "//llvm:Option",
+ "//llvm:Support",
+ "//llvm:config",
+ ],
+)
More information about the llvm-commits
mailing list