[Bro-Dev] ninja builds

Siwek, Jon jsiwek at illinois.edu
Wed Nov 19 09:23:03 PST 2014

Ninja builds (https://martine.github.io/ninja/) should now work with Bro’s master branch.
After installing it, Bro can use it like:

	./configure --generator=Ninja
	cd build && ninja
	# May want to use —builddir if you want generated files to go somewhere besides ./build

The benefit over generating standard Makefiles is it checks for out-of-date targets quicker, which I’ve found to consume a majority of the build time for just small source code changes (e.g. a few .cc files).  Examples:

A “no-op” build:

$ time ninja >/dev/null
real    0m0.162s
user    0m0.119s
sys     0m0.083s

$ time make >/dev/null
real    0m8.280s
user    0m4.191s
sys     0m3.029s

Single source file changed:

$ touch src/Attr.cc

$ time ninja >/dev/null
real    0m1.715s
user    0m1.541s
sys     0m0.273s

$ time make >/dev/null
real    0m9.725s
user    0m5.723s
sys     0m3.223s

- Jon

More information about the bro-dev mailing list