-
-
Notifications
You must be signed in to change notification settings - Fork 782
xmake v2.3.2, 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.
- 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
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.
buildsystem | Termux (8core/-j12) | buildsystem | MacOS (8core/-j12) |
---|---|---|---|
xmake | 24.890s | xmake | 12.264s |
ninja | 25.682s | ninja | 11.327s |
cmake(gen+make) | 5.416s+28.473s | cmake(gen+make) | 1.203s+14.030s |
cmake(gen+ninja) | 4.458s+24.842s | cmake(gen+ninja) | 0.988s+11.644s |
buildsystem | Termux (-j1) | buildsystem | MacOS (-j1) |
---|---|---|---|
xmake | 1m57.707s | xmake | 39.937s |
ninja | 1m52.845s | ninja | 38.995s |
cmake(gen+make) | 5.416s+2m10.539s | cmake(gen+make) | 1.203s+41.737s |
cmake(gen+ninja) | 4.458s+1m54.868s | cmake(gen+ninja) | 0.988s+38.022s |
- 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