Background
PR #1291 (fixes #1276) added the ensure_lib_deps() helper to
crates/fbuild-build-engine/src/pipeline/library.rs and wired it into the
AVR orchestrator. The helper downloads registry/remote lib_deps entries
before the compiler is created, so library include directories are available
during compilation and their archives are linked into the firmware.
What's left
Eleven orchestrators that use run_sequential_build_with_libs() still pass
&[] as extra_link_inputs and never download lib_deps. Each needs
the same 3-step integration:
- Read
lib_deps / lib_ignore from config
- Call
pipeline::ensure_lib_deps() before creating the compiler (use a
temp compiler to get c/cxx flags)
- Add the returned include dirs to the compiler and pass the archives as
extra_link_inputs
Orchestrators to fix
| Orchestrator |
File |
| Teensy |
crates/fbuild-build-arm/src/teensy/orchestrator.rs |
| STM32 |
crates/fbuild-build-arm/src/stm32/orchestrator/mod.rs |
| STM32 (Arduino Mbed) |
crates/fbuild-build-arm/src/stm32/orchestrator/arduino_mbed.rs |
| RP2040 |
crates/fbuild-build-arm/src/rp2040/orchestrator.rs |
| SAM |
crates/fbuild-build-arm/src/sam/orchestrator.rs |
| CH32V |
crates/fbuild-build-mcu/src/ch32v/orchestrator.rs |
| ESP8266 |
crates/fbuild-build-esp/src/esp8266/orchestrator.rs |
| NRF52 |
crates/fbuild-build-arm/src/nrf52/orchestrator.rs |
| Renesas |
crates/fbuild-build-arm/src/renesas/orchestrator.rs |
| Silabs |
crates/fbuild-build-arm/src/silabs/orchestrator.rs |
| Apollo3 |
crates/fbuild-build-arm/src/apollo3/orchestrator.rs |
| NXP LPC |
crates/fbuild-build-arm/src/nxplpc/orchestrator.rs |
Reference
The AVR integration in PR #1291 is the canonical example — see the diff at
crates/fbuild-build-mcu/src/avr/orchestrator.rs. The pattern is mechanical:
build a temp compiler for flags, call ensure_lib_deps(), extend
include_dirs, pass lib_archives to run_sequential_build_with_libs.
Already working
Background
PR #1291 (fixes #1276) added the
ensure_lib_deps()helper tocrates/fbuild-build-engine/src/pipeline/library.rsand wired it into theAVR orchestrator. The helper downloads registry/remote
lib_depsentriesbefore the compiler is created, so library include directories are available
during compilation and their archives are linked into the firmware.
What's left
Eleven orchestrators that use
run_sequential_build_with_libs()still pass&[]asextra_link_inputsand never downloadlib_deps. Each needsthe same 3-step integration:
lib_deps/lib_ignorefrom configpipeline::ensure_lib_deps()before creating the compiler (use atemp compiler to get c/cxx flags)
extra_link_inputsOrchestrators to fix
crates/fbuild-build-arm/src/teensy/orchestrator.rscrates/fbuild-build-arm/src/stm32/orchestrator/mod.rscrates/fbuild-build-arm/src/stm32/orchestrator/arduino_mbed.rscrates/fbuild-build-arm/src/rp2040/orchestrator.rscrates/fbuild-build-arm/src/sam/orchestrator.rscrates/fbuild-build-mcu/src/ch32v/orchestrator.rscrates/fbuild-build-esp/src/esp8266/orchestrator.rscrates/fbuild-build-arm/src/nrf52/orchestrator.rscrates/fbuild-build-arm/src/renesas/orchestrator.rscrates/fbuild-build-arm/src/silabs/orchestrator.rscrates/fbuild-build-arm/src/apollo3/orchestrator.rscrates/fbuild-build-arm/src/nxplpc/orchestrator.rsReference
The AVR integration in PR #1291 is the canonical example — see the diff at
crates/fbuild-build-mcu/src/avr/orchestrator.rs. The pattern is mechanical:build a temp compiler for flags, call
ensure_lib_deps(), extendinclude_dirs, passlib_archivestorun_sequential_build_with_libs.Already working
ensure_libraries()directly (predates this PR)