- Rename pw_toolchain/dummy to pw_toolchain/default to make its intended
purpose clear. Keep pw_toolchain/dummy around for compatibility.
- Create a template that generates non-C++ toolchains. This is used for
non-C++ tasks like Python and proto. GN parses build files differently
in the default toolchain (all targets are instantiated), so the
these toolchains can be used when that is not desired.
- Make pw_python_package's toolchain configurable with the
pw_build_PYTHON_TOOLCHAIN arg.
- Make pw_proto_library's toolchain configurable with the
pw_protobuf_compiler_TOOLCHAIN arg.
Requires: pigweed-internal:11680
Change-Id: I0aad049c605906b77c58b93a08efc63a648947ee
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/40763
Reviewed-by: Armando Montanez <amontanez@google.com>
Reviewed-by: Keir Mierle <keir@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 replaces the implicit overrides of the default GN target
types in BUILDCONFIG.gn with explicit pw_* versions. This is done to
allow Pigweed to build within larger GN projects without modifying their
BUILDCONFIG files.
Change-Id: I1d1e41d5e9bde8fe076f7031f3c2b98b9630ff70
This CL reworks toolchains to be defined as scopes composing configs and
toolchain args. This allows individual targets to add configs to or
remove configs from the defaults.
Change-Id: I105a231f3e2de35499e1617241f3eeb42ef3248d
Enable -Wshadow for upstream pigweed to improve compatibility with
projects that decide to enable this flag.
Change-Id: I7e1ce22f245e719ec78118370e591437abe07f0a
Renames host.gni to target_config.gni so all targets have a
target_config.gni, and it's clear which .gni file to use for target
configuration.
Change-Id: I1bd0442a9dc00201bff46eb776a4a59c1d339a4e
- The pw_polyfill module brings some C++17 features to C++11 and C++14.
- The module's overrides are added to the GN build to seamlessly
support older C++ standards.
Change-Id: Icb29772073e681e1ef868561bdde56e629e9c0d9
- Override built-in targets, which gives more flexibility than
set_defaults.
- Provide the default C++ in the toolchain, which can be overridden by
explicitly specifying a config on a target.
- Remove the C++17 default flags from public configs, since it is no
longer needed.
Change-Id: If211bada971c46cef83909bf15811a4f2c1eb7fd
Starting a new project requires copying Pigweed's BUILDCONFIG.gn as the
foundation for a project's own BUILDCONFIG. This change adds
documentation and some minor changes to the structure of the BUILDCONFIG
to simplify it.
Change-Id: I1354afedea28b1d1e04d1cdb663451f73c6fc3f9
This change defines the build target system used by Pigweed, where the
build is configured using per-target globals imported from a target .gni
file. A single build arg specifying the path to the target file replaces
the previous args.
A default build variables file is provided in the Pigweed root. This
file defines and documents all of the build variables used by Pigweed.
A top-level targets directory is added to define the targets used by
Pigweed developers. Currently, only a "host" target is added, which
configures the build for a development system based on the host OS.
Change-Id: Ie62b8d41e5789bfe7fffe20462160142c79076c4
This change makes the default toolchain for the build system an
argument so that it can be configured per build target.
Change-Id: I32822be9a6e33376bb1e75b996f79d3451ef9963
This change adds Pigweed's first few (incomplete) modules: pw_build,
pw_status, and pw_toolchain. The main scaffolding for Pigweed's GN-based
build system is also included, with a root BUILDCONFIG and BUILD.gn file
defining a top-level modules build target.
Change-Id: I09599443d50696343d6c5b85853cb5cee3ce0026