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.
- 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
|buildsystem||Termux (8core/-j12)||buildsystem||MacOS (8core/-j12)|
Single task compilation
|buildsystem||Termux (-j1)||buildsystem||MacOS (-j1)|
- Add powershell theme for powershell terminal
xmake --dry-run -vto dry run building target and only show verbose build command.
- #712: Add sdcc platform and support sdcc compiler
- #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
- #695: Improve android abi