Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed LTO builds by using multiple threads
On my i5-1235U laptop this speeds LTO "partition=balanced" builds substantially, because each "partition" can be run on a separate CPU thread. I used "pygamer" as my test build with a parallelism of `-j4`, and took the best elapsed time reported over 4 builds. The improvement was from 34.6s to 24.0s (-30%). A link-only build (rm build-pygamer/firmware.elf; make -j...) improved from1 17.4s to 5.1s (-70%) The size of the resulting firmware is unchanged. Boards that are nearly full use "-flto-partition=one" to improve code size optimization. When LTO partition is "one", this feature doesn't help but it doesn't seem to negatively affect anything either (tested building trinket_m0)
- Loading branch information