Skip to content

Commit e44dbfa

Browse files
authored
fix(bazel): Add missing dependency to benchmark targets (#15543)
This commit resolves build failures in several benchmark targets by explicitly adding a dependency on @com_google_benchmark//:benchmark. The benchmark executables were failing to compile or link because they were missing a direct dependency on the core Google Benchmark library, even though they depended on :benchmark_main. This change ensures the benchmark APIs are available to the targets, fixing the build errors.
1 parent 9926010 commit e44dbfa

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

google/cloud/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ cc_library(
140140
tags = ["benchmark"],
141141
deps = [
142142
":google_cloud_cpp_common",
143+
"@com_google_benchmark//:benchmark",
143144
"@com_google_benchmark//:benchmark_main",
144145
],
145146
) for benchmark in google_cloud_cpp_common_benchmarks]
@@ -228,6 +229,7 @@ cc_library(
228229
deps = [
229230
":google_cloud_cpp_common",
230231
":google_cloud_cpp_grpc_utils",
232+
"@com_google_benchmark//:benchmark",
231233
"@com_google_benchmark//:benchmark_main",
232234
"@com_google_googleapis//google/bigtable/admin/v2:admin_cc_grpc",
233235
"@com_google_googleapis//google/bigtable/v2:bigtable_cc_grpc",
@@ -333,6 +335,7 @@ cc_library(
333335
tags = ["benchmark"],
334336
deps = [
335337
":google_cloud_cpp_rest_internal",
338+
"@com_google_benchmark//:benchmark",
336339
"@com_google_benchmark//:benchmark_main",
337340
],
338341
) for benchmark in google_cloud_cpp_rest_internal_benchmarks]

google/cloud/spanner/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ cc_library(
150150
":google_cloud_cpp_spanner",
151151
":google_cloud_cpp_spanner_mocks",
152152
"//:common",
153+
"@com_google_benchmark//:benchmark",
153154
"@com_google_benchmark//:benchmark_main",
154155
],
155156
) for benchmark in spanner_client_benchmarks]

google/cloud/storage/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ cc_library(
259259
deps = [
260260
":google_cloud_cpp_storage",
261261
"//:common",
262+
"@com_google_benchmark//:benchmark",
262263
"@com_google_benchmark//:benchmark_main",
263264
],
264265
) for benchmark in storage_client_benchmarks]

0 commit comments

Comments
 (0)