xmake v2.3.2 released, Build as fast as ninja
This version focuses on refactoring and optimization of the internal parallel build mechanism, enabling parallel compilation of source files between multiple targets, and support for parallel links. It also optimizes some internal losses of xmake and fixes some bugs that affect compilation speed. Through testing and comparison, the current overall build speed is basically the same as ninja. Compared to cmake/make, meson/ninja is much faster, because they have an extra step to generate makefile / build.ninja.
In addition, xmake also adds support for the sdcc compilation toolchain for compiling embedded programs such as 51/stm8.
Some optimizations
- All source files between multiple targets are built in parallel at the same time (previously, they cannot cross targets, and will be blocked by links in the middle of serialization)
- Multiple independent target links can be executed in parallel (previously only one link could be executed)
- Fix previous task scheduling bug, more fine-grained scheduling, make full use of CPU core resources
- Optimize some losses on xmake's internal api, this effect is also obvious
For more optimization details, please see: issue #589
Build speed comparison
We did some comparison tests on termux and macOS. The test project is at: xmake-core
For a relatively large number of target projects, the new version of xmake improves its build speed even more.
Multi-task parallel compilation
Single task compilation
New features
- Add powershell theme for powershell terminal
- Add xmake --dry-run -v to dry run building target and only show verbose build command.
- #712: Add sdcc platform and support sdcc compiler
Change
- #589: Improve and optimize build speed, supports parallel compilation and linking across targets
- Improve the ninja/cmake generator
- #728: Improve os.cp to support reserve source directory structure
- #732: Improve find_package to support homebrew/cmake pacakges
- #695: Improve android abi