Skip to content

Commit

Permalink
pw_rpc: Add --pwpb-no-oneof-callbacks to protobuf compiler options
Browse files Browse the repository at this point in the history
This is to disable usage of oneof callbacks in Android.

Change-Id: Ib3d5687950598a25114ffb989467b40c9b57582b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/244272
Docs-Not-Needed: Matthew Sedam <[email protected]>
Commit-Queue: Matthew Sedam <[email protected]>
Reviewed-by: Alexei Frolov <[email protected]>
Lint: Lint 🤖 <[email protected]>
  • Loading branch information
Matthew Sedam authored and CQ Bot Account committed Oct 23, 2024
1 parent 4cc5370 commit d52c558
Showing 4 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pw_log/Android.bp
Original file line number Diff line number Diff line change
@@ -93,6 +93,7 @@ genrule {
"--language pwpb " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc) && " +
// TODO(b/308678575) - Avoid making an extra copy of the created file.
"python3 -c \"import os; import shutil; " +
@@ -127,6 +128,7 @@ genrule {
"--language pwpb_rpc " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc) && " +
// TODO(b/308678575) - Avoid making an extra copy of the created file.
"python3 -c \"import os; import shutil; " +
@@ -161,6 +163,7 @@ genrule {
"--language raw_rpc " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc) && " +
// TODO(b/308678575) - Avoid making an extra copy of the created file.
"python3 -c \"import os; import shutil; " +
3 changes: 3 additions & 0 deletions pw_protobuf/Android.bp
Original file line number Diff line number Diff line change
@@ -98,6 +98,7 @@ genrule {
"--language nanopb " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc) ",
out: [
"pw_protobuf_protos/common.pb.h",
@@ -149,6 +150,7 @@ genrule {
"--language pwpb " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc) ",
out: [
"pw_protobuf_protos/common.pwpb.h",
@@ -180,6 +182,7 @@ genrule {
"--language pwpb " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc) ",
out: [
"google/protobuf/descriptor.pwpb.h",
12 changes: 12 additions & 0 deletions pw_rpc/Android.bp
Original file line number Diff line number Diff line change
@@ -183,6 +183,7 @@ genrule {
"--language pwpb " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc) ",
out: [
"pw_rpc/internal/packet.pwpb.h",
@@ -205,6 +206,7 @@ genrule {
"--no-generate-type-hints " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc)",
out: [
"packet_pb2.py",
@@ -240,6 +242,7 @@ genrule_defaults {
"--sources $${proto_files} " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc)",
tools: [
"aprotoc",
@@ -282,6 +285,7 @@ genrule_defaults {
"--sources $${proto_files} " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc)",
tools: [
"aprotoc",
@@ -307,6 +311,7 @@ genrule_defaults {
"--sources $(in) " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc)",
tools: [
"aprotoc",
@@ -349,6 +354,7 @@ genrule_defaults {
"--sources $${proto_files} " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc)",
tools: [
"aprotoc",
@@ -370,6 +376,7 @@ genrule_defaults {
"--sources $(in) " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc)",
tools: [
"aprotoc",
@@ -401,6 +408,7 @@ genrule_defaults {
"--sources $${proto_files} " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc)",
tools: [
"aprotoc",
@@ -422,6 +430,7 @@ genrule_defaults {
"--sources $(in) " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc)",
tools: [
"aprotoc",
@@ -453,6 +462,7 @@ genrule_defaults {
"--sources $${proto_files} " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc)",
tools: [
"aprotoc",
@@ -474,6 +484,7 @@ genrule_defaults {
"--sources $(in) " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc)",
tools: [
"aprotoc",
@@ -505,6 +516,7 @@ genrule_defaults {
"--sources $${proto_files} " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc)",
tools: [
"aprotoc",
1 change: 1 addition & 0 deletions pw_tokenizer/Android.bp
Original file line number Diff line number Diff line change
@@ -172,6 +172,7 @@ genrule {
"--language pwpb " +
"--no-experimental-proto3-optional " +
"--no-experimental-editions " +
"--pwpb-no-oneof-callbacks " +
"--protoc=$(location aprotoc) ",
out: [
"pw_tokenizer_proto/options.pwpb.h",

0 comments on commit d52c558

Please sign in to comment.