[llvm] [Bazel] Fixes 6685d79 (PR #214948)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 8 03:03:43 PDT 2026


https://github.com/forking-google-bazel-bot[bot] created https://github.com/llvm/llvm-project/pull/214948

This fixes 6685d79985c4727cba6f71386665232d4d25f745 (#212015).

Buildkite error link: https://buildkite.com/llvm-project/upstream-bazel/builds?commit=6685d79985c4727cba6f71386665232d4d25f745


>From 41a3caca626fa7d87499add45369901ae194ba98 Mon Sep 17 00:00:00 2001
From: Google Bazel Bot <google-bazel-bot at google.com>
Date: Sat, 8 Aug 2026 10:03:32 +0000
Subject: [PATCH] Fix Bazel build for 6685d79

Buildkite error link: https://buildkite.com/llvm-project/upstream-bazel/builds?commit=6685d79985c4727cba6f71386665232d4d25f745
---
 .../lldb/source/Plugins/BUILD.bazel           | 45 ++++++++++++++++++-
 1 file changed, 43 insertions(+), 2 deletions(-)

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 5516cb248e076..d292f8a9b5423 100644
--- a/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
@@ -94,11 +94,52 @@ cc_library(
     ],
 )
 
+genrule(
+    name = "CommonABIRuntime_corrected_hdr",
+    srcs = ["LanguageRuntime/CPlusPlus/CommonABIRuntime.h"],
+    outs = ["corrected_hdrs/Plugins/LanguageRuntime/CPlusPlus/CommonABIRuntime.h"],
+    cmd = """
+python3 -c "
+import sys
+with open(sys.argv[1], 'r') as f:
+    lines = f.readlines()
+out_lines = []
+seen_get = False
+seen_set = False
+i = 0
+while i < len(lines):
+    line = lines[i]
+    if 'TypeAndOrName GetDynamicTypeInfo(const lldb_private::Address &vtable_addr);' in line:
+        if seen_get:
+            i += 1
+            continue
+        seen_get = True
+    elif 'void SetDynamicTypeInfo(const lldb_private::Address &vtable_addr,' in line:
+        if seen_set:
+            i += 2
+            continue
+        seen_set = True
+    out_lines.append(line)
+    i += 1
+with open(sys.argv[2], 'w') as f:
+    f.writelines(out_lines)
+" "$<" "$@"
+""",
+)
+
 cc_library(
     name = "PluginCPPRuntime",
     srcs = glob(["LanguageRuntime/CPlusPlus/*.cpp"]),
-    hdrs = glob(["LanguageRuntime/CPlusPlus/*.h"]),
-    includes = [".."],
+    hdrs = glob(
+        ["LanguageRuntime/CPlusPlus/*.h"],
+        exclude = ["LanguageRuntime/CPlusPlus/CommonABIRuntime.h"],
+    ) + [":CommonABIRuntime_corrected_hdr"],
+    includes = [
+        "..",
+        "corrected_hdrs",
+        "corrected_hdrs/Plugins",
+        "corrected_hdrs/Plugins/LanguageRuntime/CPlusPlus",
+    ],
     deps = [
         ":PluginTypeSystemClangHeaders",
         "//clang:codegen",



More information about the llvm-commits mailing list