-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BaseTools: ninja build system for faster builds #6530
base: master
Are you sure you want to change the base?
Conversation
I've been wanting to switch the build system to Ninja for a while, so this is a step in the right direction!
|
4f2c500
to
16be978
Compare
I was thinking about bazel/buck2, they are much more flexible than Ninja. But it would be hard to support two build systems. Ninja seems to be good enough to be a meta-generated layer that runs in parallel. |
I'm hoping we can switch entirely from GNU Make to Ninja in future. |
This change is just for BaseTools. Have you evaluated to apply ninja for platform build? |
I can't figure out how to do the dependency graph properly yet. I found a hack to generate |
@YangGangUEFI , have you chance to evaluate ninja build system? |
Hi, I'll take a look at this. (There are probably two main things: 1. build.ninja file for Ninja, 2. integrating with the current EDK2 build process) BTW: For these changes in BaseTools ninja support, I also see there is another old PR BaseTools: CMake Support. which can also support Ninja in BaseTools. (Don't touch current makefiles, add additional BaseTools/CMakeLists.txt file, but need CMake installed) Do we need evaluate it with current PR? |
I think CMake is a more generic way to create BaseTools on different platforms. The current PR can only work on POSIX systems, because I have no experience with Windows as a development platform. And honestly, the Makefile code looks really ugly. The only advantage of using Makefiles directly is synchronisation with current Makefiles, you don't need to separately maintain CMake. |
Agree with this.
On this point, it seemly use Makefiles directly with ninja is more better. One more question, is there a way to use the ninja |
The current makefiles are executed sequentially. The VfrCompile build also includes an antlr build that generates code over a long period of time. Ninja allows to parallelise builds of different utilities and build them 2.5 times faster. Signed-off-by: Alexander Gryanko <[email protected]>
16be978
to
5f54ef5
Compare
I added |
Description
The current makefiles are executed sequentially. The VfrCompile build also includes an antlr build that generates code over a long period of time. Ninja allows to parallelise builds of different utilities and build them 2.5 times faster.
How This Was Tested
Integration Instructions
N/A