Skip to content

Commit

Permalink
pw_protobuf_compiler: Add GN argument for generate protos
Browse files Browse the repository at this point in the history
Add argument for generate protos similar to cmake implementation.

Change-Id: I81ae1105ef86da79f486c1b6be5a7e4d365dd73e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/259432
Docs-Not-Needed: Al Semjonovs <[email protected]>
Reviewed-by: Ewout van Bekkum <[email protected]>
Reviewed-by: Yuval Peress <[email protected]>
Pigweed-Auto-Submit: Al Semjonovs <[email protected]>
Commit-Queue: Al Semjonovs <[email protected]>
Lint: Lint 🤖 <[email protected]>
  • Loading branch information
asemjonovs authored and CQ Bot Account committed Jan 10, 2025
1 parent 664160e commit ec95722
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pw_protobuf_compiler/proto.gni
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ template("_pw_invoke_protoc") {
invoker.use_legacy_oneof_interfaces) {
args += [ "--pwpb-no-oneof-callbacks" ]
}
args += [ "$pw_protobuf_compiler_GENERATE_PROTOS_ARGS" ]

if (pw_protobuf_compiler_PROTOC_TARGET != "") {
assert(
pw_protobuf_compiler_PROTOC_BINARY != "",
Expand Down
3 changes: 3 additions & 0 deletions pw_protobuf_compiler/toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ declare_args() {
# Generate .pyi files for Python type hinting. This requires 'protoc-gen-mypy'
# to be available on the PATH.
pw_protobuf_compiler_GENERATE_PYTHON_TYPE_HINTS = true

# Args for generate_protos.py
pw_protobuf_compiler_GENERATE_PROTOS_ARGS = ""
}

0 comments on commit ec95722

Please sign in to comment.