Skip to content

Commit 08dc81b

Browse files
committed
[bazel] fixes to make Telemetry work in lldb
Previously telemetry was optional at build-time in such a way that none of it was built at all, but llvm/llvm-project@159b872b3736 changed that and now it's optional in a different way so we need to have it available in the bazel BUILD graph.
1 parent a9b2e31 commit 08dc81b

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,14 +639,12 @@ cc_library(
639639
"source/Core/**/*.cpp",
640640
"source/ValueObject/**/*.cpp", # This should be its own library.
641641
],
642-
exclude = ["source/Core/Telemetry.cpp"],
643642
),
644643
hdrs = glob(
645644
[
646645
"include/lldb/Core/**/*.h",
647646
"include/lldb/ValueObject/**/*.h", # This should be its own library.
648647
],
649-
exclude = ["include/lldb/Core/Telemetry.h"],
650648
),
651649
includes = ["include"],
652650
deps = [
@@ -661,9 +659,11 @@ cc_library(
661659
":SymbolHeaders",
662660
":TargetHeaders",
663661
":Utility",
662+
":Version",
664663
"//clang:driver",
665664
"//lldb/source/Plugins:PluginCPlusPlusLanguageHeaders",
666665
"//lldb/source/Plugins:PluginObjCLanguageHeaders",
666+
"//llvm:Telemetry",
667667
"//llvm:Demangle",
668668
"//llvm:Support",
669669
"//llvm:TargetParser",

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,15 @@ cc_library(
10281028
],
10291029
)
10301030

1031+
cc_library(
1032+
name = "Telemetry",
1033+
srcs = glob(["lib/Telemetry/*.cpp"]),
1034+
hdrs = glob(["include/llvm/Telemetry/*.h"]),
1035+
copts = llvm_copts,
1036+
includes = ["include"],
1037+
deps = [":Support"],
1038+
)
1039+
10311040
cc_library(
10321041
name = "TextAPI",
10331042
srcs = glob(

utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,6 @@
124124
/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
125125
#define LLVM_ENABLE_DIA_SDK 0
126126

127+
#define LLVM_ENABLE_TELEMETRY 1
128+
127129
#endif

0 commit comments

Comments
 (0)