Skip to content

Conversation

Jason2866
Copy link
Owner

@Jason2866 Jason2866 commented Sep 7, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Corrects assembler flag handling in PlatformIO builds, ensuring architecture and ABI flags are applied consistently and without duplication.
    • Improves build reliability and compatibility by properly emitting flags for both assembler and assembler-with-cpp steps.
  • Chores

    • Centralizes and deduplicates build flags for the assembler pipeline, simplifying configuration and reducing the risk of misconfiguration across build stages.

Copy link

coderabbitai bot commented Sep 7, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Introduces logic in tools/copy-libs.sh to collect assembler-related flags from PIO_CXX_FLAGS and PIO_CC_FLAGS into PIO_AS_FLAGS, deduplicate and space-join them, emit ASFLAGS dynamically, and add ASPPFLAGS with -x assembler-with-cpp. The same insertion appears twice in the script.

Changes

Cohort / File(s) Summary
Build tooling scripts
tools/copy-libs.sh
Aggregate -march/-mabi/-mlongcalls from PIO_CXX_FLAGS and PIO_CC_FLAGS into PIO_AS_FLAGS; dedupe and join; replace hard-coded ASFLAGS with dynamic emission; add ASPPFLAGS (incl. -x assembler-with-cpp); identical logic inserted in two places.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer
  participant SH as tools/copy-libs.sh
  participant Env as PIO_* FLAGS
  participant PY as pioarduino-build.py

  Dev->>SH: Run script
  SH->>Env: Read PIO_CXX_FLAGS, PIO_CC_FLAGS
  rect rgba(200,230,255,0.4)
    note over SH: Filter -march, -mabi, -mlongcalls
    SH->>SH: Deduplicate + join -> PIO_AS_FLAGS
  end
  SH->>PY: Emit ASFLAGS from PIO_AS_FLAGS
  SH->>PY: Emit ASPPFLAGS from PIO_AS_FLAGS + "-x assembler-with-cpp"
  note over SH,PY: Logic appears twice in script (duplicate insertion)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I gathered flags like clover leaves,
-march, -mabi in tidy sheaves.
I stitched them neat for AS to chew,
With CPP spice, a fresh-brewed stew.
Two hops repeated—oops, I see!
Still, builds now hum with rabbit glee. 🐇🔧


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b31fd2 and 5dafb3c.

📒 Files selected for processing (1)
  • tools/copy-libs.sh (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 55_as_arch

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.

@Jason2866 Jason2866 merged commit e1acb00 into v5.5_Arduino Sep 7, 2025
11 of 12 checks passed
@Jason2866 Jason2866 deleted the 55_as_arch branch September 7, 2025 12:03
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