[tint][build] Generate benchmarks for GN and Bazel
These were not emitted, or were emitted incorrectly.
Aside from fuzzers, CMake, GN and Bazel now all generate the same executable, library, test and benchmark targets.
Change-Id: I88c115d4fb974755fc7c476694f4ef79d6e18e49
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/150860
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/lang/wgsl/reader/BUILD.bazel b/src/tint/lang/wgsl/reader/BUILD.bazel
index 116874d..e47e37f 100644
--- a/src/tint/lang/wgsl/reader/BUILD.bazel
+++ b/src/tint/lang/wgsl/reader/BUILD.bazel
@@ -64,12 +64,13 @@
)
cc_library(
name = "bench",
+ alwayslink = True,
srcs = [
"reader_bench.cc",
],
deps = [
"//src/tint/api/common",
- "//src/tint/cmd/bench",
+ "//src/tint/cmd/bench:bench",
"//src/tint/lang/core",
"//src/tint/lang/core/constant",
"//src/tint/lang/core/ir",
@@ -92,6 +93,7 @@
"//src/tint/utils/symbol",
"//src/tint/utils/text",
"//src/tint/utils/traits",
+ "@benchmark",
],
copts = COPTS,
visibility = ["//visibility:public"],