Skip to content

Commit 5e80e56

Browse files
committed
cleanup
1 parent 4a772b6 commit 5e80e56

File tree

10 files changed

+33
-32
lines changed

10 files changed

+33
-32
lines changed

api/BUILD

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Copyright The OpenTelemetry Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4-
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "int_flag", "string_flag")
5-
load("//bazel:otel_cc.bzl", "otel_cc_binary", "otel_cc_import", "otel_cc_library", "otel_cc_shared_library", "otel_cc_test")
4+
load("@bazel_skylib//rules:common_settings.bzl", "int_flag", "string_flag")
5+
load("//bazel:otel_cc.bzl", "otel_cc_library")
66

77
package(default_visibility = ["//visibility:public"])
88

@@ -23,7 +23,6 @@ string_flag(
2323

2424
otel_cc_library(
2525
name = "api",
26-
hdrs = glob(["include/**/*.h"]),
2726
defines = ["HAVE_ABSEIL"] + select({
2827
":set_cxx_stdlib_none": [],
2928
### automatic selection
@@ -43,9 +42,9 @@ otel_cc_library(
4342
":abi_version_no_1": ["OPENTELEMETRY_ABI_VERSION_NO=1"],
4443
":abi_version_no_2": ["OPENTELEMETRY_ABI_VERSION_NO=2"],
4544
}),
46-
strip_include_prefix = "include",
4745
tags = ["api"],
4846
deps = [
47+
"headers",
4948
"@abseil-cpp//absl/base",
5049
"@abseil-cpp//absl/strings",
5150
"@abseil-cpp//absl/types:variant",

api/test/plugin/BUILD

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
load("//:dll_deps.bzl", "dll_deps")
5-
load("//bazel:otel_cc.bzl", "otel_cc_binary", "otel_cc_import", "otel_cc_library", "otel_cc_shared_library", "otel_cc_test")
5+
load("//bazel:otel_cc.bzl", "otel_cc_test")
66

77
otel_cc_test(
88
name = "dynamic_load_test",
99
srcs = [
1010
"dynamic_load_test.cc",
1111
],
12-
linkopts = [
13-
"-ldl",
14-
],
12+
linkopts = select({
13+
"//bazel:windows": [],
14+
"//conditions:default": ["-ldl"],
15+
}),
1516
tags = [
1617
"api",
1718
"test",

api/test/singleton/BUILD

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,10 @@ otel_cc_test(
174174
"component_g",
175175
"component_h",
176176
],
177-
linkopts = [
178-
"-ldl",
179-
],
177+
linkopts = select({
178+
"//bazel:windows": [],
179+
"//conditions:default": ["-ldl"],
180+
}),
180181
linkstatic = False,
181182
tags = [
182183
"api",

examples/batch/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ otel_cc_binary(
99
srcs = [
1010
"main.cc",
1111
],
12-
linkopts = ["-lpthread"],
12+
linkopts = select({
13+
"//bazel:windows": [],
14+
"//conditions:default": ["-pthread"],
15+
}),
1316
tags = ["ostream"],
1417
deps = dll_deps([
1518
"//api",

examples/metrics_simple/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ otel_cc_binary(
99
srcs = [
1010
"metrics_ostream.cc",
1111
],
12-
linkopts = ["-pthread"],
12+
linkopts = select({
13+
"//bazel:windows": [],
14+
"//conditions:default": ["-pthread"],
15+
}),
1316
tags = ["ostream"],
1417
deps = dll_deps([
1518
"//api",

examples/plugin/load/BUILD

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
load("//:dll_deps.bzl", "dll_deps")
5-
load("//bazel:otel_cc.bzl", "otel_cc_binary", "otel_cc_import", "otel_cc_library", "otel_cc_shared_library", "otel_cc_test")
5+
load("//bazel:otel_cc.bzl", "otel_cc_binary")
66

77
otel_cc_binary(
88
name = "load_plugin",
@@ -14,9 +14,10 @@ otel_cc_binary(
1414
# This argument here is a dummy config file, that's been read and ignored
1515
"$(rootpath //examples/plugin/plugin:example_plugin.so)",
1616
],
17-
linkopts = [
18-
"-ldl",
19-
],
17+
linkopts = select({
18+
"//bazel:windows": [],
19+
"//conditions:default": ["-ldl"],
20+
}),
2021
deps = dll_deps([
2122
"//api",
2223
"//examples/plugin/plugin:example_plugin.so",

examples/prometheus/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ otel_cc_binary(
99
srcs = [
1010
"main.cc",
1111
],
12-
linkopts = ["-pthread"],
12+
linkopts = select({
13+
"//bazel:windows": [],
14+
"//conditions:default": ["-pthread"],
15+
}),
1316
tags = ["prometheus"],
1417
deps = dll_deps([
1518
"//api",

exporters/elasticsearch/BUILD

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,12 @@ otel_cc_library(
1212
"src/es_log_record_exporter.cc",
1313
"src/es_log_recordable.cc",
1414
],
15-
hdrs = [
16-
"include/opentelemetry/exporters/elasticsearch/es_log_record_exporter.h",
17-
"include/opentelemetry/exporters/elasticsearch/es_log_recordable.h",
18-
],
19-
strip_include_prefix = "include",
2015
tags = ["es"],
2116
deps = [
17+
"headers",
2218
"//ext:headers",
2319
"//ext/src/http/client/curl:http_client_curl",
2420
"//sdk/src/logs",
25-
"@curl",
2621
"@nlohmann_json//:json",
2722
],
2823
)
@@ -37,7 +32,6 @@ otel_cc_test(
3732
deps = dll_deps([
3833
":es_log_record_exporter",
3934
"@googletest//:gtest_main",
40-
"@curl",
4135
# This was not exported in the "dll" version, hence it needs to be linked in statically
4236
# In the non-dll version, it'll be just a duplicate dependency, and would be ignored
4337
"@nlohmann_json//:json",

exporters/etw/BUILD

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
# Copyright The OpenTelemetry Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4-
load("//bazel:otel_cc_benchmark.bzl", "otel_cc_benchmark")
54
load("//:dll_deps.bzl", "dll_deps")
6-
load("//bazel:otel_cc.bzl", "otel_cc_binary", "otel_cc_import", "otel_cc_library", "otel_cc_shared_library", "otel_cc_test")
5+
load("//bazel:otel_cc.bzl", "otel_cc_library", "otel_cc_test")
6+
load("//bazel:otel_cc_benchmark.bzl", "otel_cc_benchmark")
77

88
package(default_visibility = ["//visibility:public"])
99

1010
otel_cc_library(
1111
name = "etw_exporter",
12-
hdrs = glob([
13-
"include/opentelemetry/exporters/etw/*.h",
14-
]),
15-
includes = ["include"],
1612
local_defines = [
1713
"HAVE_MSGPACK",
1814
],
1915
tags = ["etw"],
2016
deps = [
17+
"headers",
2118
"//:windows_only",
2219
"//api",
2320
"//sdk/src/trace",

sdk/b.ps1

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)