|
|
Subscribe / Log in / New account

Kbuild + ninja

Kbuild + ninja

Posted Nov 17, 2016 18:22 UTC (Thu) by rabinv (guest, #99886)
Parent article: The Ninja build tool

Here's an experimental Ninja build file generator for the Linux kernel I hacked up a while ago: https://github.com/rabinv/kninja. 0.065 seconds for a no-op build vs make's 2.254 seconds.


to post comments

Kbuild + ninja

Posted Nov 17, 2016 20:11 UTC (Thu) by pbonzini (subscriber, #60935) [Link] (1 responses)

How much of that is due to Kbuild's usage of recursive Makefiles?

Kbuild + ninja

Posted Nov 17, 2016 20:45 UTC (Thu) by rabinv (guest, #99886) [Link]

I didn't try removing the recursiveness so I don't know how much just of the slowness is just from that. IIRC I measured over one million stat(2) calls on a no-op build with make. I found a couple of low hanging fruits in the kernel's makefiles like the fact that gcc is invoked over 40 times even before running any rules: https://patchwork.kernel.org/patch/9201089/ https://patchwork.kernel.org/patch/9201093/ (haven't followed up on those patches yet though).


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds