mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
Set optimization options properly on benchmarks
PiperOrigin-RevId: 897735107
This commit is contained in:
parent
48ce31daef
commit
019796e235
4 changed files with 16 additions and 1 deletions
|
|
@ -9,6 +9,11 @@ load("@rules_cc//cc:cc_test.bzl", "cc_test")
|
|||
load("@rules_python//python:defs.bzl", "py_binary")
|
||||
load("//bazel:cc_proto_library.bzl", "cc_proto_library")
|
||||
load("//bazel:proto_library.bzl", "proto_library")
|
||||
load(
|
||||
"//upb/bazel:copts.bzl",
|
||||
"UPB_DEFAULT_CPPOPTS",
|
||||
"UPB_DEFAULT_FEATURES",
|
||||
)
|
||||
load("//upb/bazel:upb_minitable_proto_library.bzl", "upb_minitable_proto_library")
|
||||
load(
|
||||
"//upb/bazel:upb_proto_library.bzl",
|
||||
|
|
@ -70,6 +75,8 @@ cc_test(
|
|||
name = "benchmark",
|
||||
testonly = 1,
|
||||
srcs = ["benchmark.cc"],
|
||||
copts = UPB_DEFAULT_CPPOPTS,
|
||||
features = UPB_DEFAULT_FEATURES,
|
||||
deps = [
|
||||
":ads_upb_proto_reflection",
|
||||
":benchmark_descriptor_cc_proto",
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ config_setting(
|
|||
name = "windows",
|
||||
constraint_values = ["@platforms//os:windows"],
|
||||
visibility = [
|
||||
"//benchmarks:__subpackages__",
|
||||
"//hpb:__subpackages__",
|
||||
"//hpb_generator:__subpackages__",
|
||||
"//lua:__pkg__",
|
||||
|
|
@ -41,13 +42,16 @@ config_setting(
|
|||
bool_flag(
|
||||
name = "fasttable_enabled",
|
||||
build_setting_default = False,
|
||||
visibility = ["//upb/bazel:__pkg__"],
|
||||
visibility = [
|
||||
"//upb/bazel:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "fasttable_enabled_setting",
|
||||
flag_values = {"//upb:fasttable_enabled": "true"},
|
||||
visibility = [
|
||||
"//benchmarks:__subpackages__",
|
||||
"//lua:__pkg__",
|
||||
"//python:__pkg__",
|
||||
"//upb:__subpackages__",
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
"""Common copts for building upb."""
|
||||
|
||||
visibility([
|
||||
"//benchmarks/...",
|
||||
"//lua/...",
|
||||
"//python/...",
|
||||
"//upb/...",
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ load("//bazel:proto_library.bzl", "proto_library")
|
|||
load(
|
||||
"//upb/bazel:copts.bzl",
|
||||
"UPB_DEFAULT_COPTS",
|
||||
"UPB_DEFAULT_CPPOPTS",
|
||||
"UPB_DEFAULT_FEATURES",
|
||||
)
|
||||
load(
|
||||
|
|
@ -169,6 +170,8 @@ cc_binary(
|
|||
name = "message_benchmark",
|
||||
testonly = 1,
|
||||
srcs = ["message_benchmark.cc"],
|
||||
copts = UPB_DEFAULT_CPPOPTS,
|
||||
features = UPB_DEFAULT_FEATURES,
|
||||
deps = [
|
||||
":compat",
|
||||
":message_benchmark_upb_minitable_proto",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue