Skip to content

fix(esp32): honor LTO flags and refresh cached archives - #1865

Merged
zackees merged 3 commits into
mainfrom
feat/esp32-link-unflags
Nov 3, 2026
Merged

zackees merged 3 commits into
mainfrom
feat/esp32-link-unflags

Conversation

@zackees

@zackees zackees commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

ESP32 builds requesting LTO still linked the SDK's -fno-lto, which prevents GCC from loading its LTO plugin even when -flto follows it. Apply build_unflags to SDK linker flags before profile selection and linker construction. Also validate local framework archives against the complete cache identity so changing LTO flags cannot reuse incompatible objects; hydration failures now stop before stale archives are accepted.

Bump the Rust workspace, lockfile, and Python package to 2.5.50 for the downstream FastLED fix.

Validation:

  • Four focused failures reproduced before the fixes; all six focused cases now pass. All ESP32/ESP8266 unit tests pass: 209 passed, 1 ignored.
  • Formatting, toolchain pins, workspace members, USB source-of-truth, and platform-boundary guards passed. Independent pre-push review passed.
  • Real ESP32-C6 on /dev/ttyACM0, Arduino 3.3.5 / ESP-IDF 5.5.1 / GCC 14.2, no LED wiring: the GCC LTO plugin and workers execute. FastLED AutoResearch reproduced two constructions before its fix and one afterward. The no-clean LTO-to-non-LTO control also passed, exercising archive invalidation.
  • Canonical full-workspace Clippy passed with warnings denied on Rust 1.95.0 and managed Python 3.12. Rust compilation used scoped soldr --no-cache to avoid shared broker contention; the product's framework-cache regression tests remained active.

Fixes #1862.
Fixes #1863.
Coordinated with FastLED/FastLED#4994; the dependency lands and publishes before the consumer PR.

Consumer integration: FastLED/FastLED#5006.

fbuild 2.5.50 is published from commit 9c0dd1bcaa38de3ac6d67c86cca202a0b4677e6c: the exact-SHA full release dry-run and publication workflow passed, and all five PyPI wheels were verified. The consumer installed that published package and passed fresh ESP32-C6 hardware acceptance with LTO after a clean build and full flash, then without LTO using no clean and a full flash. Both runs completed two contending tasks, proved overlap, and constructed the local static exactly once. All 456 consumer Python tests also passed with the released package.

Require local framework archives to match the full content-addressed cache identity before reuse. Invalidate legacy or mismatched outputs, publish hydration identity atomically, and abort on invalidation failures.

Fixes #1863
Filter SDK ld_flags before LTO profile policy and linker construction, in both the metadata fast path and the full build. This lets explicit -fno-lto removals actually enable the GCC linker plugin. Fixes #1862. Coordinated with FastLED/FastLED#4994.
Publish the ESP32 SDK linker-unflag and local framework-cache fixes needed by FastLED/FastLED#4994.
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@zackees
zackees added this pull request to the merge queue Nov 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 3, 2026
@zackees
zackees added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 9c0dd1b Nov 3, 2026
39 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 3, 2026
@zackees
zackees deleted the feat/esp32-link-unflags branch November 5, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

ESP32: local framework archives ignore changed compiler flags ESP32: build_unflags does not remove SDK linker -fno-lto

1 participant