Skip to content

fix(esp32): resolve guarded framework libraries - #1454

Merged
zackees merged 3 commits into
mainfrom
feat/1452-framework-library-discovery
Sep 21, 2026
Merged

zackees merged 3 commits into
mainfrom
feat/1452-framework-library-discovery

Conversation

@zackees

@zackees zackees commented Sep 21, 2026

Copy link
Copy Markdown
Member

Closes #1452.
Related: FastLED/FastLED#4482.

What changed

  • give ESP32 framework-library discovery the compiler's ordered core/variant/SDK/project include path
  • preserve header-derived macros as undecidable while collecting source-local defines, preventing conditional fallbacks in one seed from incorrectly pruning another translation unit
  • retain selective per-library archives; unused framework libraries remain uncompiled/unlinked, avoiding Matter global-constructor retention without relying on LTO
  • bump the LDF cache semantic version
  • isolate a pre-existing QEMU runtime cache test exposed by the full suite

Validation

  • bash test
  • soldr cargo clippy --workspace --all-targets -- -D warnings
  • focused header-scanner and SDK-capability tests
  • ignored real ESP32-C6 integration test: guarded LittleFS selects both LittleFS and transitive FS
  • exact FastLED production repro with this local fbuild: AutoResearch on ESP32-C6 succeeded (2.34 MB flash, 74.98 KB RAM)
  • compiler-order shadow-header regression

Architecture decision

Compiling/linking every bundled ESP32 framework library is not safe: some bundled libraries are incompatible with a target, expensive to compile, or contain global constructors that can retain large subsystems. Ordinary per-library archives plus --gc-sections already provide non-LTO stripping for unreferenced members. The general solution is therefore accurate direct/transitive discovery using the compiler's include view, not a full PlatformIO LDF clone and not blanket archive inclusion.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: FastLED/fbuild/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c39b555b-84fd-4eea-93f8-d7155ee6574d

📥 Commits

Reviewing files that changed from the base of the PR and between 0cdeaa5 and f2689bf.

⛔ Files ignored due to path filters (1)
  • ci/platform_boundary_research.tsv is excluded by !**/*.tsv
📒 Files selected for processing (10)
  • crates/fbuild-build-engine/src/framework_libs.rs
  • crates/fbuild-build-engine/src/framework_libs_tests.rs
  • crates/fbuild-build-esp/src/esp32/orchestrator/build.rs
  • crates/fbuild-build/tests/esp32_build.rs
  • crates/fbuild-header-scan/src/lib.rs
  • crates/fbuild-header-scan/src/scanner.rs
  • crates/fbuild-header-scan/src/scanner_tests.rs
  • crates/fbuild-library-select/src/cache.rs
  • crates/fbuild-library-select/src/lib.rs
  • crates/fbuild-toolchain/src/toolchain/esp_qemu_runtime.rs

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

Comment @coderabbitai help to get the list of available commands.

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.

2.5.25 regression: framework library selection drops LittleFS although the sketch includes <LittleFS.h> (esp32s3)

1 participant