DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
Posted Apr 10, 2018 5:06 UTC (Tue) by karkhaz (subscriber, #99844)In reply to: DNF 3: better performance and a move to C++ by linuxrocks123
Parent article: DNF 3: better performance and a move to C++
The difference with my version is that I haven't written my own build tool---my "baker.py" always emits ninja syntax, rather than your custom syntax that needs its own build tool. So running baker.py is akin to running `configure`, and I then separately run ninja to build. You get parallel compilation and many other goodies for free with ninja.
If you don't like cmake, there's no need to write an entire build+metabuild system---cmake is just the meta-build aspect. As for builds, I don't think the fact that ninja is wonderful is controversial, so you should just emit ninja from your meta-build system and use that to build.
I haven't published it because it's ugly and needs a rewrite but hopefully the idea is clear w.r.t. how your system works.
Posted Apr 10, 2018 10:45 UTC (Tue)
by HelloWorld (guest, #56129)
[Link] (2 responses)
Posted Apr 10, 2018 11:00 UTC (Tue)
by karkhaz (subscriber, #99844)
[Link] (1 responses)
A big reason why ninja is so much faster than make is that it doesn't evaluate environment variables or have any kind of fancy logic (there's no support for all of the functions and expansions that make has). All of the decision-making should be done at configure time, there's no need to repeat it every time you build.
2. Multiple build directories, each with a different build configuration. With out-of-tree builds, I can have one build directory for release builds, one for debug, one for building only a sub-project, etc. You typically configure each of these directories once, e.g. by passing parameters or environment variables to the meta-build system; and then the build command is just `ninja` in each one. If the meta-build and build commands are combined, then you need to pass the parameters/variables _every single time_ you run a build, and need to remember which parameters are associated with each directory.
Posted Apr 10, 2018 12:29 UTC (Tue)
by HelloWorld (guest, #56129)
[Link]
As for your other argument, I don't buy that either. Release and debug builds should simply be different targets, and the build system should give you sufficient means of abstraction so that the common parts can be easily shared between the two.
Posted Oct 24, 2018 9:09 UTC (Wed)
by linuxrocks123 (subscriber, #34648)
[Link]
The two systems are somewhat different, probably most notably in that a Bakefile calls its clients to generate the dependency tree, and will give a previous client's output as input to a later client for modification. Of course, I haven't actually used that for anything. Also the -sub feature looks unique, though I haven't actually written a baker.py that uses it yet, so perhaps it's harder to make use of than I suspected. No harm in keeping it around, though.
(Also yeah it's months later; sorry for not seeing this at the time.)
DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++