Looks like the higher memory requirements come from building with a clean cache, and affect all operating systems, not just macOS.