Skip to content

fbuild build: default-on bloat report after link (Phase 5 of #434) #441

Description

@zackees

Background

Phase 5 of #434. Depends on Phase 3 (#439).

Same way fbuild build emits build_info.json by default today, make
it emit bloat-report/{report.json,report.md} by default post-link.

What to do

1. Default-on bloat report

After every successful link, run the bloat analyzer and drop:

<project>/.fbuild/build/<env>/bloat-report/report.json
<project>/.fbuild/build/<env>/bloat-report/report.md

No flag needed.

2. Opt-out flag

Add --no-bloat-report for CI matrices where bloat reports would blow
up the artifact size (~50–500 KB per env per build).

3. Print the paths on link exit

Same shape as Phase 3's bloat-on-stdout: fbuild build . ends with

Bloat report:
  /abs/path/.fbuild/build/esp32s3/bloat-report/report.json
  /abs/path/.fbuild/build/esp32s3/bloat-report/report.md

so users have the paths in their terminal without having to remember
them.

Acceptance

  • fbuild build . on an esp32s3 Blink project drops
    bloat-report/report.json + report.md alongside the ELF without
    any extra flag.
  • fbuild build --no-bloat-report . skips the report.
  • Adds ≤ 1 s to incremental builds (analyzer is fast; symbol-extraction
    is the same nm call that already runs for size_path reporting).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions