default source installs to fast no-LTO profile - #1086
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds a PEP 517 backend adapter supporting fbuild profile settings, configures packaging to use it, documents release builds, and preserves ESP32 linker section garbage collection when SDK flags are provided. ChangesPEP 517 build backend
ESP32 linker flags
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Pip
participant build_backend
participant Setuptools
participant setup_py
Pip->>build_backend: Pass fbuild profile settings
build_backend->>build_backend: Validate settings
build_backend->>setup_py: Set FBUILD_BUILD_RELEASE temporarily
build_backend->>Setuptools: Delegate build operation
Setuptools-->>Pip: Return artifact or metadata
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pip install . --config-settings fbuild-profile=release.FBUILD_BUILD_RELEASE=1as an environment override.Why
pip install . -- --releaseis not a supported pip-to-PEP-517 forwarding mechanism. The backend adapter translates the standard--config-settingsvalue into the existing setup.py profile switch.No-LTO builds already compile with
-ffunction-sectionsand-fdata-sectionsacross the platform JSON configurations. The ESP32 linker now adds-Wl,--gc-sectionswhen SDK-provided linker flags omit it, preserving section-level dead-code elimination for compact quick builds.Measurements
Using
tests/platform/esp32dev, ESP32 Arduino core 3.3.7, and xtensa-esp-elf-gcc 14.2.0:For this fixture, no-LTO is 2.7 seconds (13%) faster with no measured size penalty after section garbage collection. The result is fixture-specific; broader boards should be benchmarked separately.
Validation
uv build --wheel --no-build-isolation: passed; produceddist/fbuild-2.5.2-cp313-cp313-win_amd64.whl.soldr rustfmt --check crates/fbuild-build-esp/src/esp32/esp32_linker.rs: passed.--gc-sections.git diff --check: passed.The wheel’s first native build took about 12.1 minutes because the Cargo target was cold; subsequent installs reuse the pinned incremental target.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation