mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-22 14:19:57 +08:00
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)