Re: -CURRENT compilation time
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 07 Sep 2021 22:28:56 UTC
> From: David Chisnall <theraven_at_FreeBSD.org>
> Date: Tue, 7 Sep 2021 14:51:21 +0100
> On 06/09/2021 20:34, Wolfram Schneider wrote:
> > With the option WITHOUT_TOOLCHAIN=yes the world build time is 2.5
> > times faster (real or user+sys), down from 48 min to 19.5 min real
> > time.
>
> Note that building LLVM with the upstream CMake + Ninja build system is
> *significantly* faster on a decent multicore machine than the FreeBSD
> bmake-based in-tree version.
Just examples of llvm12 builds from my checking this . . .
poudriere-devel llvm12 buil times, nothing else being built, all
prerequisites already built (not that such are trivial):
amd64 ThreadRipper 1950X with 128 GiByte of RAM, optane 1.4T media, 32 FreeBSD cpus:
[00:00:07] [01] [00:00:00] Building devel/llvm12 | llvm12-12.0.1_4
[00:22:54] [01] [00:22:47] Finished devel/llvm12 | llvm12-12.0.1_4: Success
for:
---Begin OPTIONS List---
===> The following configuration options are available for llvm12-12.0.1_4:
BE_AMDGPU=on: AMD GPU backend (required by mesa)
CLANG=on: Build clang
COMPILER_RT=on: Sanitizer libraries
DOCS=on: Build and/or install documentation
EXTRAS=on: Extra clang tools
GOLD=on: Build the LLVM Gold plugin for LTO
LIT=on: Install lit and FileCheck test tools
LLD=on: Install lld, the LLVM linker
LLDB=on: Install lldb, the LLVM debugger
OPENMP=on: Install libomp, the LLVM OpenMP runtime library
PYCLANG=off: Install python bindings to libclang
====> Options available for the single BACKENDS: you have to select exactly one of them
BE_FREEBSD=off: Backends for FreeBSD architectures
BE_NATIVE=on: Backend(s) for this architecture (X86)
BE_STANDARD=off: All non-experimental backends
===> Use 'make config' to modify these settings
---End OPTIONS List---
Note the BE_NATIVE use. Also poudriere.conf has:
ZPOOL=zoptb
USE_TMPFS=yes
ALLOW_MAKE_JOBS=yes
For reference:
# uname -apKU
FreeBSD amd64_ZFS 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #1 releng/13.0-n244760-940681634ee1-dirty: Mon Aug 30 11:28:31 PDT 2021 root@amd64_ZFS:/usr/obj/BUILDs/13_0R-amd64-nodbg-clang/usr/13_0R-src/amd64.amd64/sys/GENERIC-NODBG amd64 amd64 1300139 1300139
The swap/paging space stayed unused.
aarch64 Honycomb with 64 GiByte of RAM, optane 480 GiByte media, 16 FreeBSD cpus:
[00:00:15] [01] [00:00:00] Building devel/llvm12 | llvm12-12.0.1_4
[00:58:07] [01] [00:57:52] Finished devel/llvm12 | llvm12-12.0.1_4: Success
for:
---Begin OPTIONS List---
===> The following configuration options are available for llvm12-12.0.1_4:
BE_AMDGPU=on: AMD GPU backend (required by mesa)
CLANG=on: Build clang
DOCS=on: Build and/or install documentation
EXTRAS=on: Extra clang tools
LIT=on: Install lit and FileCheck test tools
LLD=on: Install lld, the LLVM linker
OPENMP=on: Install libomp, the LLVM OpenMP runtime library
PYCLANG=off: Install python bindings to libclang
====> Options available for the single BACKENDS: you have to select exactly one of them
BE_FREEBSD=off: Backends for FreeBSD architectures
BE_NATIVE=on: Backend(s) for this architecture (AArch64)
BE_STANDARD=off: All non-experimental backends
===> Use 'make config' to modify these settings
---End OPTIONS List---
Note the BE_NATIVE use. Also poudriere.conf has:
ZPOOL=zopt0
USE_TMPFS="data"
ALLOW_MAKE_JOBS=yes
For reference:
# uname -apKU
FreeBSD CA72_16Gp_ZFS 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #4 releng/13.0-n244760-940681634ee1-dirty: Mon Aug 30 11:35:45 PDT 2021 root@CA72_16Gp_ZFS:/usr/obj/BUILDs/13_0R-CA72-nodbg-clang/usr/13_0R-src/arm64.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1300139 1300139
The swap/paging space stayed unused.
I've not yet figured out a good way to time just an analogous
subset of buildworld . It would need to be stable/13 or main
[so: 14] targetted to involve building an llvm12 based set of
material. releng/13.0 is llvm11 based.
One point is that likely the system builds libc++ and such
but devel/llvm12 does not: devel/llvm12 likely is bound to the
system libc++ and such. This may make "analogous subset of
buildworld" harder to isolate.
So I've not made it to well-measured differences in time-used
yet.
> One of the things I'd love to prototype if I had time is a CMake-based
> build system for FreeBSD so that we could get all of the tooling
> integration from the compile_commands.json, reuse LLVM's (and any other
> contrib things that use CMake) build system without having to recreate
> it, and be able to use ninja, to build.
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)