This updates pw_protobuf_compiler to always create a target for each
supported protobuf generator, instead of having a build arg to select
which ones to use, simplifying the use of pw_proto_library.
Change-Id: I2699c9c5045e8671a061f8c8bc11a94244d008f1
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/22721
Reviewed-by: Armando Montanez <amontanez@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Alexei Frolov <frolv@google.com>
This updates generated protobuf targets to use the format
<target>.<generator> instead of <target>_<generator> to improve
readability.
Change-Id: I52d1e398d5bbece7f79ae87e9a1df7fdce880a6b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/22222
Reviewed-by: Wyatt Hepler <hepler@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Alexei Frolov <frolv@google.com>
The "# gn-format disable" comments are no longer necessary. Delete these
comments and reformat with a Vim macro and gn format.
Change-Id: Ia62c40ad73eef91187d0d443d6e3b0fa723e5aa9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/21380
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
This change configures the Linux clang -Og target as a toolchain with
args. To support this, all Pigweed variables from pw_vars_default are
made into build args, defined within their respective modules.
The Linux clang target/toolchain is the only one that currently works.
Pigweed's other targets will be ported in later changes.
Change-Id: I051e29fde7577e41a3184c37031a4e04936404e1
Require targets to explicitly import pigweed variable definitions. This
moves out some necessary logic from the BUILDCONFIG.gn file.
Change-Id: If9c9fe5a680cc9d897a0e8a55889873be618ed84
This change adds support for compiling nanopb protobufs using
pw_protobuf_compiler.
The pw_protobuf_langs build variable is renamed to
pw_protobuf_generators as there is no longer a 1:1 mapping of languages.
To compile nanopb, add the "nanopb" generator to pw_protobuf_generators.
The build variable $dir_third_party_nanopb must be set to point to a
local installation of nanopb with GN support:
https://github.com/frolv/nanopb/tree/gn-build
The host build will run a test which compiles nanopb code if
$dir_third_party_nanopb is set.
Change-Id: I29bf8780644917f35203a538b0bd7e4f3ec40180
This change adds a module responsible for invoking the protobuf compiler
to generate code from .proto definition files. It provides a GN template
which performs the codegen operation on a list of input .proto files.
The template currently only supports C++.
Change-Id: I5558fd5b4282e0d6f09f8fafebda972738dc1e83