Re: building libclang and WITHOUT_TOOLCHAIN?

From: Ronald Klop <ronald-lists_at_klop.ws>
Date: Tue, 25 Nov 2025 15:12:10 UTC
Van: Warner Losh <imp@bsdimp.com>
Datum: dinsdag, 25 november 2025 15:27
Aan: Ronald Klop <ronald-lists@klop.ws>
CC: FreeBSD Current <current@freebsd.org>
Onderwerp: Re: building libclang and WITHOUT_TOOLCHAIN?
> 
>  
> On Tue, Nov 25, 2025, 6:52AM Ronald Klop <ronald-lists@klop.ws> wrote:
>> 
>> Hi,
>> 
>> My build setup contains WITHOUT_TOOLCHAIN which saved me a lot of time on the Raspberry Pi's.
>> Since a while they are building llvm/clang stuff nonetheless.
>> I have the feeling this started when llvm/clang started to be build as private libraries.
>> 
>> https://github.com/freebsd/freebsd-src/commit/2e47f35be5dc61945afdbd1a70e8fd505c032c94
>> 
>> Could this change have influenced how WITHOUT_TOOLCHAIN works?
>> Would it be possible to skip building these libraries using other knobs?
>> 
>> Or is my thought about this unfounded?
> 
>  
> In yhr last week or three i fixed a bug in metamode that eould always rebuild the toolchain... when did you last try?
>  
> Warner
>  
>> 
>> Regards,
>> Ronald.
>> 
>>  
> 


Currently building 16-current on a 15 days old system. I don't think I use metamode. I just do buildworld.
$ uname -a
FreeBSD rpi5 16.0-CURRENT FreeBSD 16.0-CURRENT #2 main-n281790-abd53b16c03f: Mon Nov 10 23:34:05 CET 2025     root@rpi5:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC-NODEBUG arm64

$ ps d -D down -p 7025
  PID TT  STAT    TIME COMMAND
 7025  1  I+   0:00.00 /usr/local/bin/bash /home/ronald/bin/makeworld.sh
 7058  1  IN+  0:00.00 - time make -j4 -DWITHOUT_CLEAN=yes -DWITHOUT_TOOLCHAIN=yes buildworld
 7059  1  SN+  0:01.79 `-- make -j4 -DWITHOUT_CLEAN=yes -DWITHOUT_TOOLCHAIN=yes buildworld
 7095  1  IN   0:00.00   `-- sh -ev
 7096  1  SN   0:01.86     `-- make -m /usr/src/share/mk -f Makefile.inc1 TARGET=arm64 TARGET_ARCH=aarch64 buildworld
21526  1  IN   0:00.00       `-- sh -ev
21527  1  IN   0:00.00         `-- time env MACHINE_ARCH=aarch64 MACHINE=arm64 CPUTYPE= CC=cc -target aarch64-unknown-freebsd16.0 --sysroot=/u
21528  1  SN   0:01.62           `-- make -f Makefile.inc1 BWPHASE=libraries DESTDIR=/usr/obj/usr/src/arm64.aarch64/tmp -DNO_FSCHG MK_HTML=no
21554  1  IN   0:00.00             `-- sh -ev
42314  1  SN   0:00.53               `-- make -f Makefile.inc1 _generic_libs
42323  1  IN   0:00.00                 `-- sh -ev
42327  1  SN   0:00.51                   `-- make MK_TESTS=no DIRPRFX=lib/ all
48783  1  IN   0:00.00                     `-- sh -e
48784  1  SN   0:00.04                       `-- make all DIRPRFX=lib/clang/
48787  1  IN   0:00.00                         `-- sh -e
48788  1  SN   0:08.68                           `-- make all DIRPRFX=lib/clang/libllvm/
54507  1  SN   0:00.00                             |-- sh -ev
54508  1  RN   0:14.53                             | `-- c++ -target aarch64-unknown-freebsd16.0 --sysroot=/usr/obj/usr/src/arm64.aarch64/tmp
54518  1  SN   0:00.00                             |-- sh -ev
54519  1  RN   0:06.47                             | `-- c++ -target aarch64-unknown-freebsd16.0 --sysroot=/usr/obj/usr/src/arm64.aarch64/tmp
54524  1  SN   0:00.00                             |-- sh -ev
54525  1  RN   0:01.34                             | `-- c++ -target aarch64-unknown-freebsd16.0 --sysroot=/usr/obj/usr/src/arm64.aarch64/tmp
54526  1  SN   0:00.00                             `-- sh -ev
54527  1  RN   0:00.68                               `-- c++ -target aarch64-unknown-freebsd16.0 --sysroot=/usr/obj/usr/src/arm64.aarch64/tmp

Regards,
Ronald.