<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/clang/libllvm, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>llvm: Link private LLVM libraries against compiler_rt for aarch64</title>
<updated>2026-02-09T16:26:52+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2026-02-09T16:26:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ee73475119ff7aa98bd11828625d524f6ab87f06'/>
<id>ee73475119ff7aa98bd11828625d524f6ab87f06</id>
<content type='text'>
This is required for GCC which uses libcalls for outlined atomics.

Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D55157
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is required for GCC which uses libcalls for outlined atomics.

Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D55157
</pre>
</div>
</content>
</entry>
<entry>
<title>src.conf: Add WITH_LLVM_LINK_STATIC_LIBRARIES build knob</title>
<updated>2025-12-23T21:01:40+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2025-06-18T10:06:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8d5a11cd0137d3ad70f6b06e063ea91a776d510a'/>
<id>8d5a11cd0137d3ad70f6b06e063ea91a776d510a</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove debug crutch I accidentally left in</title>
<updated>2025-12-22T11:49:42+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2025-12-22T11:49:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3b1126208f44a90c7dc04a87207e54b22d45893c'/>
<id>3b1126208f44a90c7dc04a87207e54b22d45893c</id>
<content type='text'>
Fixes:		cf1eaaf41cef
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes:		cf1eaaf41cef
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Reduce number of external symbols in libllvm, libclang and liblldb</title>
<updated>2025-12-22T09:31:40+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2025-12-21T21:37:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cf1eaaf41cefe7e3aef45f6dab862191a3939ed8'/>
<id>cf1eaaf41cefe7e3aef45f6dab862191a3939ed8</id>
<content type='text'>
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, upstream builds the shared libraries using several visibility
options, which reduces the number of external symbols, and makes the
libraries a bit smaller.

On my test machine:
* libprivatellvm.so goes from 75643 to 34706 symbols (~54% reduction)
* libprivateclang.so goes from 53250 to 33531 symbols (~37% reduction)
* libprivatelldb.so goes from 27242 to 18798 symbols (~31% reduction)

Note: to get the full benefit, a clean build is required. Incremental
builds should still work, but I didn't want to force a full rebuild on
everybody.

MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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, upstream builds the shared libraries using several visibility
options, which reduces the number of external symbols, and makes the
libraries a bit smaller.

On my test machine:
* libprivatellvm.so goes from 75643 to 34706 symbols (~54% reduction)
* libprivateclang.so goes from 53250 to 33531 symbols (~37% reduction)
* libprivatelldb.so goes from 27242 to 18798 symbols (~31% reduction)

Note: to get the full benefit, a clean build is required. Incremental
builds should still work, but I didn't want to force a full rebuild on
everybody.

MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove TableGen objects from libllvm, fixing bad option registrations</title>
<updated>2025-11-28T18:14:15+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2025-11-28T18:12:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9978553d0199e7ec0bdd1c44fc7f6c7b0c11e43b'/>
<id>9978553d0199e7ec0bdd1c44fc7f6c7b0c11e43b</id>
<content type='text'>
In 986e05bc2a18 I revamped the build for all the llvm subprojects. Among
others I added objects under contrib/llvm-project/llvm/lib/TableGen, but
I missed that upstream explicitly removes these when building the shared
llvm library:

https://github.com/llvm/llvm-project/blob/llvmorg-19.1.7/llvm/tools/llvm-shlib/CMakeLists.txt#L23

In 2e47f35be5dc I converted libllvm to a shared library. From that point
onwards, some of the global command line option objects registered in
llvm/lib/TableGen/Main.cpp conflict with similar objects in tools like
llvm-cov, llvm-as, etc.

This results in an error when running these tools: "CommandLine Error:
Option 'o' registered more than once!", followed by a fatal exit.

Fix this by removing the TableGen objects from libllvm. Note that we no
longer install any of the tblgen binaries, these are only used during
buildworld, and then in a statically linked form.

PR:		291233
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 986e05bc2a18 I revamped the build for all the llvm subprojects. Among
others I added objects under contrib/llvm-project/llvm/lib/TableGen, but
I missed that upstream explicitly removes these when building the shared
llvm library:

https://github.com/llvm/llvm-project/blob/llvmorg-19.1.7/llvm/tools/llvm-shlib/CMakeLists.txt#L23

In 2e47f35be5dc I converted libllvm to a shared library. From that point
onwards, some of the global command line option objects registered in
llvm/lib/TableGen/Main.cpp conflict with similar objects in tools like
llvm-cov, llvm-as, etc.

This results in an error when running these tools: "CommandLine Error:
Option 'o' registered more than once!", followed by a fatal exit.

Fix this by removing the TableGen objects from libllvm. Note that we no
longer install any of the tblgen binaries, these are only used during
buildworld, and then in a statically linked form.

PR:		291233
MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert libllvm, libclang and liblldb into private shared libraries</title>
<updated>2025-04-25T17:56:39+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2025-04-25T17:56:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2e47f35be5dc61945afdbd1a70e8fd505c032c94'/>
<id>2e47f35be5dc61945afdbd1a70e8fd505c032c94</id>
<content type='text'>
This allows clang, lld, lldb, and other llvm tools to be linked against
these shared libraries, which makes them smaller and avoids duplication.

Since these are not quite the same as the shared libraries shipped by
the upstream llvm build system, and we do not want to expose the ABI to
external programs such as ports, make them private libraries.

Note that during the cross-tools stage they are still built as static
libraries, so the cross compiler and linker are static binaries, as they
have always been.

This also requires a depend-cleanup.sh kludge which will be added in a
follow-up commit, to ensure binaries are rebuilt against the shared
libraries in case of incremental builds.

MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D49967
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows clang, lld, lldb, and other llvm tools to be linked against
these shared libraries, which makes them smaller and avoids duplication.

Since these are not quite the same as the shared libraries shipped by
the upstream llvm build system, and we do not want to expose the ABI to
external programs such as ports, make them private libraries.

Note that during the cross-tools stage they are still built as static
libraries, so the cross compiler and linker are static binaries, as they
have always been.

This also requires a depend-cleanup.sh kludge which will be added in a
follow-up commit, to ensure binaries are rebuilt against the shared
libraries in case of incremental builds.

MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D49967
</pre>
</div>
</content>
</entry>
<entry>
<title>libllvm: remove duplicated SRCS_MIN line</title>
<updated>2025-04-19T19:27:16+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2025-04-19T19:27:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=160a2ba804973e4b258c24247fa7c0cdc230dfb4'/>
<id>160a2ba804973e4b258c24247fa7c0cdc230dfb4</id>
<content type='text'>
This is not harmful when making a static library apparently, but will
result in duplicate symbol errors when making a dynamic library.

MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is not harmful when making a static library apparently, but will
result in duplicate symbol errors when making a dynamic library.

MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2</title>
<updated>2024-10-23T18:26:26+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2024-07-30T14:27:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=36b606ae6aa4b24061096ba18582e0a08ccd5dba'/>
<id>36b606ae6aa4b24061096ba18582e0a08ccd5dba</id>
<content type='text'>
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2.

PR:		280562
MFC after:	1 month
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2.

PR:		280562
MFC after:	1 month
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0</title>
<updated>2024-10-23T18:26:01+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2024-07-27T23:34:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583'/>
<id>0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583</id>
<content type='text'>
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-19-init-18630-gf2ccf80136a0, the
last commit before the upstream release/19.x branch was created.

PR:		280562
MFC after:	1 month
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-19-init-18630-gf2ccf80136a0, the
last commit before the upstream release/19.x branch was created.

PR:		280562
MFC after:	1 month
</pre>
</div>
</content>
</entry>
<entry>
<title>dirdeps: update Makefile.depend for toolchain</title>
<updated>2024-09-24T01:24:45+00:00</updated>
<author>
<name>Ka Ho Ng</name>
<email>khng@FreeBSD.org</email>
</author>
<published>2024-09-24T01:02:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1d910b5f88197de4f43c2c464bda1000e4df8ba8'/>
<id>1d910b5f88197de4f43c2c464bda1000e4df8ba8</id>
<content type='text'>
Sponsored by:	Juniper Networks, Inc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sponsored by:	Juniper Networks, Inc.
</pre>
</div>
</content>
</entry>
</feed>
