Re: -CURRENT compilation time

From: Warner Losh <imp_at_bsdimp.com>
Date: Wed, 08 Sep 2021 20:32:16 UTC
On Wed, Sep 8, 2021, 6:33 AM David Chisnall <theraven@freebsd.org> wrote:

> On 08/09/2021 11:52, Gary Jennejohn wrote:
> > Seems to me that there was an earlier mail about getting CMAKE to work
> > with FreeBSD builds.  Could be worthwhile to look into getting ninja
> > to work also.  But I could understand that there might be push-back,
> > since the project prefers to use utilities from the source tree.
>
> CMake is a build-system generator, Ninja is a build system.  Usually the
> two are used together: CMake generates Ninja files, Ninja runs the
> build.  Ninja is explicitly designed not to be written by hand.
>
> CMake can also emit other things, including POSIX Makefiles, but the
> Ninja build is usually the fastest.
>
> CMake and Ninja are both in package systems for Windows, macOS, *BSD,
> and all Linux distros that I've seen, unlike bmake, so  universally easy
> to depend on for cross-builds.  Cross compiling with bmake is much
> harder harder from anything that isn't FreeBSD.
>

This may be true. I've never had a problem on mac or linux, but my windows
experience is thin.

I got looking at the problem, btw, to see if ninja was faster than meta
mode. Ninja files aren't horrible to generate, but I never got past the
early proof of concept phase... it seemed possible to implement a make
ninja target... I'd wanted to use this day to day if it was better than
meta.

Mason, however looked much harder to generate, but I didn't spend a lot of
time on it. I would think this sort of work would be more of a one shot.
Didn't look at cmake at all, but I imagine it would be similar...

Warner

>