- Use the deduction guides specified in the C++20 draft standard.
- Expand tests to cover all deduction guides.
Change-Id: I9ab0c44b7bb1097c554c7e56f0b174b2615cacd3
Prints "(all)" as the segment and "(same)" for before/after when bloat
binaries have identical segments. Previously, nothing was printed.
Example output:
┌────────────┬───────────┬────────┬───────┬────────┐
│ Label │ Segment │ Before │ Delta │ After │
├════════════┼═══════════┼════════┼═══════┼════════┤
│ Identical! │ (all) │ (same) │ 0 │ (same) │
└────────────┴───────────┴────────┴───────┴────────┘
Change-Id: Ib02f0db55a6c8fbba053444b3a33408805e8e0aa
- Support specifying per-binary bases instead of a global base in size
reports.
- Resolve paths in semicolon-separated paths in python_runner.py.
- Remove --base-target option from bloat.py. Instead, the base must be
specified for each target.
- Add '\n' to the end of size report text files.
- Apply yapf to python_runner.py and bloat.py.
Change-Id: I3f0e6f16b028e97ed6db4b3d975a9aada98c076a
This change adds a GN template to the pw_unit_test module which defines
a group of unit tests. The template creates a generated_file target with
JSON metadata for the unit tests and dependencies within the test group.
These metadata files are intended to be parsed by the test runner script
to run unit tests outside of GN.
A pw_test_group target is added to each of the existing modules which
have unit tests.
Change-Id: I363b937da365d0a3482a979feace18ecba1807a9
This starts the pw_cmd module, which will eventually have a command line
tool to make working with Pigweed easier. The initial command has only 1
abilitiy: to watch the Pigweed source directory for changes and trigger
a recompile & test re-run if something changed. This makes for a fast
iteration time that avoids having to explicitly compile.
In the future this will expand to have multiple other sub-commands.
Change-Id: Ic82ab376716900914660fd8ae2787384a69110bd
This change introduces the pw_dumb_io module, a module intended for
pigweed testing and bringup. pw_dumb_io includes a facade, and a backend
implementation using stdio (pw_dumb_io_stdio).
Change-Id: I5d9ca3c256c7e7c6d60cc07292aaead808a7f3dd
This change renames the bloat_report template to pw_size_report as it is
more explicit.
Additionally, the option to override the global Bloaty config file on a
per-report basis is removed. This is due to Pigweed's policy of having
one target per build invocation. The Bloaty config is inherently tied to
an executable build target and linker script, both of which are provided
by the target. Overriding the Bloaty config without changing the target
can result in meaningless report output.
Change-Id: I1fa444d065d964a3a85ade50039e06ae807050f2
Provide a string::Format function that writes to a span. The snprintf
return value is interpreted and returned as a StatusWithSize.
Change-Id: Ib7fed684dc333d5feaef85c1bb558cb45e3936bd
To avoid bloat binaries from needing an infinite loop at the end of the
main function, put an infinite loop at the start of BloatThisBinary.
Now, bloat binaries based on the standard pw_bloat base only have to
call BloatThisBinary in their main function.
Change-Id: I165bb76a3d7a85fb1a10b5f55a0538da7d920f82
This change adds a docs directory at the root level of the Pigweed
repository for building documentation for the entirety of Pigweed.
The directory contains a top-level index.rst and conf.py for docgen,
and a pw_doc_gen build target to render the documentation.
Change-Id: Iba981c64662d48a1d23bb7bda9bf0ed5a104873b
This change updates the bloat script to output an RST version of its
report card table. Metadata is added to the bloat_report GN template
indicating its RST output, allowing it to be listed as a dependency of
pw_doc_group targets.
Change-Id: I3f098d352856a9dd8688bac44e3b60ddbb97a3a6
This change adds a size reporting module named pw_bloat. The module
uses Bloaty McBloatface to generate size report cards for binaries. It
provides a GN template which defines an action to perform a size diff
on a group of binary targets.
Example output:
simple_bloat
────────────
┌────────────────┬──────────────┬────────┬───────┬───────┐
│ Label │ Segment │ Before │ Delta │ After │
├════════════════┼══════════════┼════════┼═══════┼═══════┤
│ Add a loop │ EXAMPLE CODE │ 429 │ +32 │ 461 │
│ │ EXAMPLE RAM │ 576 │ +8 │ 584 │
├────────────────┼──────────────┼────────┼───────┼───────┤
│ Add a function │ EXAMPLE CODE │ 429 │ +16 │ 445 │
│ │ EXAMPLE RAM │ 576 │ +8 │ 584 │
└────────────────┴──────────────┴────────┴───────┴───────┘
Change-Id: I14b3d383ec450bc6d017bf5d0111e266b0a3c368
- Move pw_unit_test_create_run_targets to pw_vars_default.gni so that
targets can set it.
- Keep the default false, but set it to true for the host targets.
Change-Id: Ia1af584642d0dd4d16b801b2ee4a8bb1a78c286e
- Update host_clang to work on Linux: switch to -Map and --gc-sections
options
- Make pw_target_toolchain a build arg for Linux and macOS targets.
Default to gcc on Linux, clang on macOS.
- Rename x86_linux_gcc to host_gcc.
Change-Id: I72eef9ba9398a331f6567b68ad404092186eb15b
EXPECT_EQ happens to work (sometimes) because of string interning, but
these strings should be compared by value with EXPECT_STREQ.
Change-Id: Ifdcc7cf12d9c0868d8e7976baf549935ef117efc
This adds a generic host_clang toolchain, targeting hosts running Mac and
Linux to start, and likely Windows later.
For now, on Mac the default toolchain is set to host_clang_og
Change-Id: Iea457c61586930d509439c6616574c9a74919433