HomeFreeBSD

src.conf: Add WITH_LLVM_LINK_STATIC_LIBRARIES build knob

Description

src.conf: Add WITH_LLVM_LINK_STATIC_LIBRARIES build knob

In commit 2e47f35be5dc libllvm, libclang and liblldb were converted into
private shared libraries. This allowed clang, lld, lldb, and other llvm
tools to be linked against these shared libraries, which makes them
smaller and avoids duplication.

However, this also comes at the cost of some performance, since the
dynamic libraries are quite large, and contain lots of long symbols
(mangled C++ identifiers).

Add a WITH_LLVM_LINK_STATIC_LIBRARIES build knob that can be used to go
back to the previous behavior: libllvm, libclang and liblldb are built
as internal static libraries, i.e. only available during buildworld, and
fully linked into the various executables such as clang, lld, etc.

PR: 287447
Reviewed by: emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D50956

(cherry picked from commit 8d5a11cd0137d3ad70f6b06e063ea91a776d510a)

Details

Provenance
dimAuthored on Jun 18 2025, 10:06 AM
Reviewer
emaste
Differential Revision
D50956: src.conf: Add WITH_LLVM_STATIC build knob
Parents
rG7a5dfa03dc6c: MFC: ipfw.8: document how to delete nat configuration instance
Branches
Unknown
Tags
Unknown