Skip to content

Adopt ensure_lib_deps() in all remaining non-ESP32 orchestrators #1292

Description

@zackees

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:

  1. Read lib_deps / lib_ignore from config
  2. Call pipeline::ensure_lib_deps() before creating the compiler (use a
    temp compiler to get c/cxx flags)
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions