Skip to content

Use {build.fpu} and {build.float-abi} for lib paths, if present#3199

Merged
cmaglie merged 1 commit into
arduino:masterfrom
pillo79:use-build-vars-for-lib-path
May 29, 2026
Merged

Use {build.fpu} and {build.float-abi} for lib paths, if present#3199
cmaglie merged 1 commit into
arduino:masterfrom
pillo79:use-build-vars-for-lib-path

Conversation

@pillo79

@pillo79 pillo79 commented May 28, 2026

Copy link
Copy Markdown
Contributor

If the platform/board defines the build.fpu and build.float-abi variables, Arduino CLI will now use those values directly to determine the expected subfolder for precompiled libraries. If either property is absent, Arduino CLI will fall back to parsing the compiler command for -mfpu= and -mfloat-abi= flags to maintain compatibility with existing platforms.

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

New feature / cleaner implementation of existing one

What is the current behavior?

Arguments are extracted from recipe.cpp.o

What is the new behavior?

Like the documentation appeared to say, use the {build.fpu} and {build.float-abi} vars if they are defined. Otherwise fallback to the pre-existing workaround.

Does this PR introduce a breaking change, and is titled accordingly?

No

@pillo79 pillo79 requested a review from cmaglie May 28, 2026 10:08
@CLAassistant

CLAassistant commented May 28, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 45.45455% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.42%. Comparing base (19afff8) to head (82733d4).

Files with missing lines Patch % Lines
internal/arduino/builder/libraries.go 45.45% 9 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3199      +/-   ##
==========================================
- Coverage   69.46%   69.42%   -0.04%     
==========================================
  Files         252      252              
  Lines       19557    19565       +8     
==========================================
- Hits        13585    13583       -2     
- Misses       4712     4720       +8     
- Partials     1260     1262       +2     
Flag Coverage Δ
unit 69.42% <45.45%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pillo79 pillo79 force-pushed the use-build-vars-for-lib-path branch 3 times, most recently from 59027f2 to fa1c521 Compare May 28, 2026 13:59
If the platform/board defines the `build.fpu` and `build.float-abi`
variables, Arduino CLI will now use those values directly to determine
the expected subfolder for precompiled libraries. If either property is
absent, Arduino CLI will fall back to parsing the compiler command for
`-mfpu=` and `-mfloat-abi=` flags to maintain compatibility with
existing platforms.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cmaglie cmaglie merged commit fb6bae1 into arduino:master May 29, 2026
108 checks passed
@cmaglie cmaglie added type: enhancement Proposed improvement topic: build-process Related to the sketch build process labels May 29, 2026
@per1234 per1234 added the topic: code Related to content of the project itself label Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: build-process Related to the sketch build process topic: code Related to content of the project itself type: enhancement Proposed improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants