Skip to content

Commit 2ce6333

Browse files
authored
[bazel] Fix lldb ODR issue (llvm#137729)
In 42622c7, depending on the entire utility library resulted in the lldb binary having more symbols that it needs, duplicating those in liblldb, leading to odr violations. Now instead we just expose the Host library's headers, which happens to be enough for this to compile and link, referencing the symbols from liblldb
1 parent b95cc91 commit 2ce6333

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ load("@build_bazel_apple_support//rules:apple_genrule.bzl", "apple_genrule")
99
load("@rules_python//python:defs.bzl", "py_binary")
1010
load("//:vars.bzl", "LLVM_VERSION_MAJOR", "LLVM_VERSION_MINOR", "LLVM_VERSION_PATCH", "LLVM_VERSION_SUFFIX", "PACKAGE_VERSION")
1111
load("//lldb/source/Plugins:plugin_config.bzl", "DEFAULT_PLUGINS", "DEFAULT_SCRIPT_PLUGINS", "OBJCPP_COPTS")
12+
load("//mlir:build_defs.bzl", "cc_headers_only")
1213
load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
1314

1415
package(
@@ -572,6 +573,11 @@ cc_library(
572573
}),
573574
)
574575

576+
cc_headers_only(
577+
name = "HostHeaders",
578+
src = ":Host",
579+
)
580+
575581
td_library(
576582
name = "CoreTdFiles",
577583
srcs = glob([
@@ -830,8 +836,7 @@ cc_binary(
830836
]),
831837
deps = [
832838
":APIHeaders",
833-
":Host",
834-
":Utility",
839+
":HostHeaders",
835840
":liblldb.wrapper",
836841
":lldb_options_inc_gen",
837842
"//llvm:Option",

0 commit comments

Comments
 (0)