Re: -CURRENT compilation time

From: Ronald Klop <ronald-lists_at_klop.ws>
Date: Tue, 07 Sep 2021 12:19:58 UTC
 
Van: David Chisnall <theraven@FreeBSD.org>
Datum: maandag, 6 september 2021 11:43
Aan: freebsd-current@freebsd.org
Onderwerp: Re: -CURRENT compilation time
> 
> On 06/09/2021 09:08, Jeremie Le Hen wrote:
> > Compiling C++ seems
> > extremely CPU heavy and this is made worse by the fact LLVM is built
> > twice (once for build/cross tools, once for the actual world).
> 
> Note that you need to build LLVM twice only if you are actively debugging LLVM reproduceable deployment images.  You actually don't need to build it at all, you can use an external toolchain to skip the first build and you can compile WITHOUT_TOOLCHAIN  to avoid building the version that's installed and then install a toolchain from packages:
> 
> https://wiki.freebsd.org/ExternalToolchain
> 
> David
> 
>  
> 
> 
> 

Hi,

I'm very interested in a base without llvm because of compile times. So I tried this in a jail with 14-current and pkg llvm12 installed.

/etc/make.conf:
WITHOUT_TOOLCHAIN=yes
CROSS_TOOLCHAIN=llvm12

Buildworld, installworld and etcupdate went fine. "yes | make delete-old" removes the toolchain from base.
Afterwards you can't do buildworld anymore.

# make buildworld
sh: cc: not found
make: "/home/ronald/dev/freebsd/share/mk/bsd.compiler.mk" line 200: warning: "cc -v 2>&1 | grep "gcc version"" returned non-zero status
make: "/home/ronald/dev/freebsd/share/mk/bsd.compiler.mk" line 204: Unable to determine compiler type for CC=cc.  Consider setting COMPILER_TYPE.

What am I missing?

Regards,
Ronald.