Convert statsd_test and statsd_benchmark to proto lite
libplatformprotos for the device is compiled using proto lite, and statsd_test and statsd_benchmark have protos that reference the libplatformprotos. With protobuf 3.9.1 compiling a full proto against a lite proto doesn't work. Convert them to lite. Requires adding the protobuf internal protos to the sources, libprotobuf-cpp-lite does not contain the compiled version of field_options.proto. Bug: 117607748 Test: m checkbuild Change-Id: I0b101555ff604df17b2e3e06f3b3ce25adb1c9fb Merged-In: I0b101555ff604df17b2e3e06f3b3ce25adb1c9fb
This commit is contained in:
parent
f74defb808
commit
959cc442a1
@ -209,6 +209,10 @@ cc_test {
|
|||||||
],
|
],
|
||||||
|
|
||||||
srcs: [
|
srcs: [
|
||||||
|
// atom_field_options.proto needs field_options.proto, but that is
|
||||||
|
// not included in libprotobuf-cpp-lite, so compile it here.
|
||||||
|
":libprotobuf-internal-protos",
|
||||||
|
|
||||||
"src/atom_field_options.proto",
|
"src/atom_field_options.proto",
|
||||||
"src/atoms.proto",
|
"src/atoms.proto",
|
||||||
"src/stats_log.proto",
|
"src/stats_log.proto",
|
||||||
@ -270,11 +274,11 @@ cc_test {
|
|||||||
],
|
],
|
||||||
|
|
||||||
proto: {
|
proto: {
|
||||||
type: "full",
|
type: "lite",
|
||||||
include_dirs: ["external/protobuf/src"],
|
include_dirs: ["external/protobuf/src"],
|
||||||
},
|
},
|
||||||
|
|
||||||
shared_libs: ["libprotobuf-cpp-full"],
|
shared_libs: ["libprotobuf-cpp-lite"],
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,6 +291,10 @@ cc_benchmark {
|
|||||||
defaults: ["statsd_defaults"],
|
defaults: ["statsd_defaults"],
|
||||||
|
|
||||||
srcs: [
|
srcs: [
|
||||||
|
// atom_field_options.proto needs field_options.proto, but that is
|
||||||
|
// not included in libprotobuf-cpp-lite, so compile it here.
|
||||||
|
":libprotobuf-internal-protos",
|
||||||
|
|
||||||
"src/atom_field_options.proto",
|
"src/atom_field_options.proto",
|
||||||
"src/atoms.proto",
|
"src/atoms.proto",
|
||||||
"src/stats_log.proto",
|
"src/stats_log.proto",
|
||||||
@ -301,7 +309,7 @@ cc_benchmark {
|
|||||||
],
|
],
|
||||||
|
|
||||||
proto: {
|
proto: {
|
||||||
type: "full",
|
type: "lite",
|
||||||
include_dirs: ["external/protobuf/src"],
|
include_dirs: ["external/protobuf/src"],
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -323,7 +331,7 @@ cc_benchmark {
|
|||||||
shared_libs: [
|
shared_libs: [
|
||||||
"libgtest_prod",
|
"libgtest_prod",
|
||||||
"libstatslog",
|
"libstatslog",
|
||||||
"libprotobuf-cpp-full",
|
"libprotobuf-cpp-lite",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user