Skip to content

feat(build): wire build_unflags through all remaining platform compilers (#37)#64

Merged
zackees merged 1 commit intomainfrom
fix/issue-37-wire-remaining-platforms
Apr 17, 2026
Merged

feat(build): wire build_unflags through all remaining platform compilers (#37)#64
zackees merged 1 commit intomainfrom
fix/issue-37-wire-remaining-platforms

Conversation

@zackees
Copy link
Copy Markdown
Member

@zackees zackees commented Apr 17, 2026

Summary

Follow-up to PR #63 (ESP32 reference impl). Applies the same one-line builder-pattern wiring to every other platform, so PlatformIO `build_unflags` now strips framework/toolchain-contributed flags on:

  • AVR
  • Teensy
  • Generic ARM (STM32, RP2040, Apollo3)
  • nRF52, Renesas, Silabs
  • CH32V
  • SAM
  • ESP8266

Per-compiler changes

Identical shape across 9 compiler files:

  • Add `build_unflags: Vec` field, initialized empty in constructor
  • Add `with_build_unflags(...)` builder method
  • Override `Compiler::build_unflags()` to return `&self.build_unflags`

Per-orchestrator changes

Each orchestrator chains `.with_build_unflags(ctx.build_unflags.clone())` on every `XxxCompiler::new(...)` site (one per orchestrator; stm32 has two). Default-impl `compile_c` / `compile_cpp` in the `Compiler` trait already filter both platform and `extra_flags` through this set when non-empty (added in PR #63), so wiring each platform picks up framework-scope filtering automatically.

Test plan

  • `uv run cargo clippy --workspace --all-targets -- -D warnings` clean
  • `uv run cargo test -p fbuild-build --lib` — 447 passed
  • CI green on Linux / macOS / Windows

Closes the remaining scope of #37.

🤖 Generated with Claude Code

…ers (#37)

Follow-up to the ESP32 reference implementation — applies the same
builder-pattern wiring to every other platform so PlatformIO
`build_unflags` now strips framework/toolchain-contributed flags on
AVR, Teensy, generic ARM (STM32 / RP2040 / Apollo3), nRF52, Renesas,
Silabs, CH32V, SAM, and ESP8266.

Per-compiler changes are identical in shape:
- Add `build_unflags: Vec<String>` field, initialized empty in constructor
- Add `with_build_unflags(...)` builder method
- Override `Compiler::build_unflags()` to return `&self.build_unflags`

Each platform orchestrator chains `.with_build_unflags(ctx.build_unflags.clone())`
on every `XxxCompiler::new(...)` site (one per orchestrator, except
stm32 which has two).

Default-impl `compile_c` / `compile_cpp` in the `Compiler` trait
already filter both platform and `extra_flags` through this set when
it's non-empty (added in PR #63), so wiring each platform picks up
framework-scope filtering automatically.

All 447 fbuild-build lib tests pass; clippy -D warnings clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Warning

Rate limit exceeded

@zackees has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 42 minutes and 6 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 42 minutes and 6 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e311e852-d9bb-44f8-8acc-5ce14c745fec

📥 Commits

Reviewing files that changed from the base of the PR and between 12ddd5a and 0f2a40a.

📒 Files selected for processing (20)
  • crates/fbuild-build/src/apollo3/orchestrator.rs
  • crates/fbuild-build/src/avr/avr_compiler.rs
  • crates/fbuild-build/src/avr/orchestrator.rs
  • crates/fbuild-build/src/ch32v/ch32v_compiler.rs
  • crates/fbuild-build/src/ch32v/orchestrator.rs
  • crates/fbuild-build/src/esp8266/esp8266_compiler.rs
  • crates/fbuild-build/src/esp8266/orchestrator.rs
  • crates/fbuild-build/src/generic_arm/arm_compiler.rs
  • crates/fbuild-build/src/nrf52/nrf52_compiler.rs
  • crates/fbuild-build/src/nrf52/orchestrator.rs
  • crates/fbuild-build/src/renesas/orchestrator.rs
  • crates/fbuild-build/src/renesas/renesas_compiler.rs
  • crates/fbuild-build/src/rp2040/orchestrator.rs
  • crates/fbuild-build/src/sam/orchestrator.rs
  • crates/fbuild-build/src/sam/sam_compiler.rs
  • crates/fbuild-build/src/silabs/orchestrator.rs
  • crates/fbuild-build/src/silabs/silabs_compiler.rs
  • crates/fbuild-build/src/stm32/orchestrator.rs
  • crates/fbuild-build/src/teensy/orchestrator.rs
  • crates/fbuild-build/src/teensy/teensy_compiler.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-37-wire-remaining-platforms

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 and usage tips.

@zackees zackees merged commit afc70e7 into main Apr 17, 2026
75 of 76 checks passed
@zackees zackees deleted the fix/issue-37-wire-remaining-platforms branch April 17, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant