Files
PX4-Autopilot/platforms
Matthias Grob c2875ad6a2 perf(nuttx): build the NuttX libraries with parallel make jobs
Each NuttX library and the apps are built by a make invocation that
ninja treats as a single opaque custom command, so they compiled one
file at a time.

Run them through a wrapper that honours a job count given to the
toplevel build (e.g. `make px4_fmu-v5x_default -j1`), which reaches it
through MAKEFLAGS, and otherwise uses the number of CPUs available to
the process. Unlike CMake's logical core count, nproc respects docker
--cpuset-cpus. A load limit keeps the concurrently running NuttX makes
from oversubscribing the host.

Mark the toplevel cmake build recipe as a sub-make with '+'. GNU make
before 4.4 (e.g. Ubuntu 22.04/24.04) passes its jobserver as pipe file
descriptors, which it otherwise closes for that recipe, leaving the
NuttX makes to fall back to serial builds.

Mention how to disable parallel builds in the docker docs.

Assisted-by: Claude Code (claude-opus-5-5)
2026-11-18 18:45:15 +01:00
..