Skip to content

Commit 0be754a

Browse files
committed
fixup! fix: bazel build with customlabels
1 parent 33a9ab9 commit 0be754a

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

BUILD.bazel

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
config_setting(
2+
name = "is_linux",
3+
constraint_values = ["@platforms//os:linux"],
4+
)
5+
16
cc_library(
27
name = "dd_trace_cpp",
38
srcs = [
@@ -132,9 +137,11 @@ cc_library(
132137
strip_include_prefix = "include/",
133138
includes = ["src/datadog"],
134139
visibility = ["//visibility:public"],
135-
deps = [
136-
"@com_google_absl//absl/strings",
137-
"@com_google_absl//absl/types:optional",
138-
"@customlabels//:customlabels"
139-
],
140+
deps = select({
141+
":is_linux": ["@customlabels//:customlabels"],
142+
"//conditions:default": [
143+
"@com_google_absl//absl/strings",
144+
"@com_google_absl//absl/types:optional",
145+
]
146+
}),
140147
)

MODULE.bazel

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ bazel_dep(
1515
name = "customlabels",
1616
version = "1.0.0",
1717
)
18+
bazel_dep(
19+
name = "platforms",
20+
version = "0.0.11",
21+
)
1822
# -- bazel_dep definitions -- #
1923

2024
non_module_dependencies = use_extension("//:extensions.bzl", "non_module_dependencies")
@@ -26,5 +30,5 @@ use_repo(
2630
git_override(
2731
module_name = "customlabels",
2832
remote = "https://github.com/DataDog/custom-labels.git",
29-
branch = "elsa/add-process-storage",
33+
commit = "1bc74232c0e414f2c63139f7cf7ac0bdce57d258",
3034
)

0 commit comments

Comments
 (0)