History log of /freebsd-current/lib/clang/headers/Makefile
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# cb14a3fe 25-Dec-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

PR: 276104
MFC after: 1 month


# 5f757f3f 18-Dec-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

PR: 276104
MFC after: 1 month


# 73ff7384 11-Feb-2024 Dimitry Andric <dim@FreeBSD.org>

Optionally create full debuginfo for llvm-related executables

Commit de6feefdb7cfd limited the amount of debuginfo generated for clang
and other llvm-related executables. This was done to save disk space and
memory during building, but it makes debugging any of these executables
much harder.

Add a new src.conf(5) setting, WITH_LLVM_FULL_DEBUGINFO, to generate
full debuginfo instead. This is off by default, but could for example be
enabled for release builds or snapshots, so llvm executables are easier
to debug.

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

# 4542f901 29-Sep-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/17.x llvmorg-17.0.1-25-g098e653a5bed

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.1-25-g098e653a5bed.

PR: 273753
MFC after: 1 month


# 06c3fb27 02-Sep-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the
last commit before the upstream release/17.x branch was created.

PR: 273753
MFC after: 1 month


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

# bdd1243d 14-Apr-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-16-init-18548-gb0daacf58f41

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16-init-18548-gb0daacf58f41.

PR: 271047
MFC after: 1 month


# 4dc3b1fa 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Revert "Ensure .inc files are regenerated when llvm/clang tblgen binaries change"

This reverts commit ab80f0b21fbb9c44d40e6f7a99090188f4ed2f71. The intent
of this change was to avoid possible compilation errors when certain
.inc files were not regenerated, but the method turns out to cause way
more rebuilds than anticipated. Another method will have to be found,
and in the mean time, WITH_CLEAN is the solution that always works.

Fixes: ab80f0b21fbb

# d8ed7fa3 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Revert "Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed"

This reverts commit 8f391d9098083044793ff036dff8c96930fb1553. There are
still a bunch of problems, and apparently ${.ALLSRC} does not work as I
expected.

Fixes: 8f391d909808

# 8f391d90 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed

This flag ensures that the tblgen tools do not actually touch the
produced .inc file, if there are no changes to the contents. In turn,
this may prevent a number of rebuilds of files that include such .inc
files, saving build time.

While here, ensure that the shell invocations to locate the used tblgen
binary do not show unnecessary error messages.

Reported by: des
MFC after: 1 week

# ab80f0b2 25-Feb-2023 Dimitry Andric <dim@FreeBSD.org>

Ensure .inc files are regenerated when llvm/clang tblgen binaries change

When doing a fully incremental build (with WITHOUT_CLEAN enabled), from
a commit before llvm 15 was merged (3264f6b88fce), to a commit after
that, a number of .inc files were not regenerated. This could lead to
unexpected compilation errors when these .inc files were included from
llvm-project sources, similar to:

In file included from /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:8268:
/usr/obj/usr/src/amd64.amd64/lib/clang/libclang/clang/Basic/arm_mve_builtin_cg.inc:279:18: error: no matching constructor for initialization of 'clang::CodeGen::Address'
Address Val2 = Address(Val1, CharUnits::fromQuantity(2));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Work around this by making the .inc files dependent on the tblgen binary
used for generating them. E.g., we can relatively safely assume that if
the binary gets updated, the .inc files must also be updated. (Although
this is not 100% optimal, the gain by complicating things even more is
probaby not worth the effort.)

MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38770

# 50d7464c 14-Jan-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6.

PR: 265425
MFC after: 2 weeks


# f3fd488f 04-Dec-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.6-0-g088f33605d8a.

PR: 265425
MFC after: 2 weeks


# 6246ae0b 16-Oct-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.2-10-gf3c5289e7846.

PR: 265425
MFC after: 2 weeks


# 753f127f 14-Jul-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-16436-g18a6ab5b8d1f.

PR: 265425
MFC after: 2 weeks


# 81ad6265 04-Jul-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-15358-g53dc0f10787.

PR: 265425
MFC after: 2 weeks


# 56f451bb 12-Jun-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR: 261742
MFC after: 3 days


# 809922b0 05-Jun-2022 Dimitry Andric <dim@FreeBSD.org>

Update rest of llvm-project build glue for 14.0.4

I completely forgot about updating the generated llvm-project config
files, which also contain version numbers, etc. Sorry for the churn.

PR: 261742
Fixes: ab9d54731f43
MFC after: 3 days

# 3a9a9c0c 28-Apr-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.3-0-g1f9140064dfb.

PR: 261742
MFC after: 2 weeks


# 04eeddc0 27-Jan-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR: 261742
MFC after: 2 weeks


# 5e801ac6 20-Nov-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR: 261742
MFC after: 2 weeks


# fe6060f1 22-Aug-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR: 258209
MFC after: 2 weeks


# 23408297 18-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project 12.0.1 rc2

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2.

PR: 255570
MFC after: 6 weeks


# e8d8bef9 13-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the
upstream release/12.x branch was created.

PR: 255570
MFC after: 6 weeks


# eaeb601b 03-Jan-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after: 4 weeks
X-MFC-With: r364284


# 9a282b3e 07-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Re-add generated arm_neon.h header, which was accidentally dropped while
refactoring lib/clang/headers/Makefile in r363984.

# 48aaf27b 06-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Update Makefiles under lib/clang and usr.bin/clang for 11.0.0 builds,
and also bump the version in the mtree files.

# d65cd7a5 23-May-2020 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1).

MFC after: 3 weeks


# 9771cac2 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Update build glue for a minimal build of the clang executable.

# 0b37c159 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

* Bump version numbers to 10.0.0
* Update UPDATING
* Update (Optional)ObsoleteFiles.inc
* Update VCS(Revision|Version) files
* Update generated config headers
* Update clang internal headers Makefile

# c14a5a88 22-Dec-2019 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
9.0.1 final release c1a0a213378a458fbea1a5c77b315c7dce08fd05.

Release notes for llvm, clang, lld and libc++ 9.0.1 will become
available here:

https://releases.llvm.org/9.0.1/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/clang/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/lld/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/projects/libcxx/docs/ReleaseNotes.html

PR: 240629
MFC after: 1 month


# 2f3724e6 31-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Update Makefile and mtree for clang internal headers, and update
OptionalObsoleteFiles.inc for added and removed files.

# 72e1e271 23-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Change clang lib dir to 9.0.0.

# efc5c442 12-Jun-2019 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,
libunwind and openmp to the upstream release_80 branch r363030
(effectively, 8.0.1 rc2). The 8.0.1 release should follow this within a
week or so.

MFC after: 2 weeks


# 0bf31f1f 20-Jan-2019 Dimitry Andric <dim@FreeBSD.org>

Update version numbers, and regenerate config headers for llvm, clang,
lld and lldb. Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc.

# 68948600 04-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch
r346007 (effectively 7.0.1 rc2), resolve conflicts, and bump version
numbers.

PR: 230240, 230355


# 611d080e 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update clang intrinsics headers.

# 6dfa117f 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update llvm/clang version numbers in various files.

# 55458465 30-Jun-2018 Dimitry Andric <dim@FreeBSD.org>

More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to
update mtree files, ObsoleteFiles and a number of other paths. Sorry
about all the breakage.

Pointy hat to: me
MFC after: 2 weeks
X-MFC-With: r335799

# fe4fed2e 28-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,
update build glue and version numbers, add new intrinsics headers, and
update OptionalObsoleteFiles.inc.


# cd8e0f1f 20-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Add new clang intrinsics headers, and update version number.

# d4419f6f 02-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch. This corresponds to 5.0.1 rc2.

MFC after: 2 weeks


# 302affcb 29-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and update
build glue.


# 68e19318 09-May-2017 Dimitry Andric <dim@FreeBSD.org>

Add new LWP intrinsics header, and an option to install internal clang
headers which have the same name as our system headers, and might
conflict with them. (It is a work in progress to make these fully
compatible.)

# f849be8a 16-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Add preliminary UPDATING and ObsoleteFiles.inc entries. Also add one
new intrinsics header.

# 5897d2f0 17-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Initial update of clang/llvm build glue, for building just a minimal
clang executable.

# 53fe1d28 05-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Adjust version numbers for the clang library directory.

# 09bfd043 03-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Initial updates to llvm/clang build glue.

# 5042637b 02-Dec-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for clang 3.9.1 r288513.

# 5b41a5b6 25-Nov-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for llvm/clang 3.9.1.

# 986e05bc 26-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Completely revamp the way llvm, clang and lldb are built.

* Bootstrap llvm-tblgen and clang-tblgen with a minimal llvm static
library, that has no other dependencies.
* Roll up all separate llvm libraries into one big static libllvm.
* Similar for all separate clang and lldb static libraries.
* For all these libraries, generate their .inc files only once.
* Link all llvm tools (including extra) against the big libllvm.
* Link clang and clang-format against the big libllvm and libclang.
* Link lldb against the big libllvm, libclang and liblldb.

N.B.: This is work in progress, some details may still be missing.

It also heavily depends on bsd.*.mk's support for SRCS and DPSRCS with
relative pathnames, which apparently does not always work as expected.
For building llvm, clang and lldb though, it seems to work just fine.

The main idea behind this restructuring is maintainability and build
peformance. The previous large number of very small libraries, each
with their own generated files and dependencies was slow to traverse
and hard to understand.

Possible future improvements:
* Only build certain targets, e.g. for most regular users having just
one target will be fine. This will shave off some build time.
* Building the big llvm, clang and lldb libraries as shared (private)
libraries.
* Adding other components from the LLVM project, such as lld.

# 73ff7384 11-Feb-2024 Dimitry Andric <dim@FreeBSD.org>

Optionally create full debuginfo for llvm-related executables

Commit de6feefdb7cfd limited the amount of debuginfo generated for clang
and other llvm-related executables. This was done to save disk space and
memory during building, but it makes debugging any of these executables
much harder.

Add a new src.conf(5) setting, WITH_LLVM_FULL_DEBUGINFO, to generate
full debuginfo instead. This is off by default, but could for example be
enabled for release builds or snapshots, so llvm executables are easier
to debug.

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


# 4542f901 29-Sep-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/17.x llvmorg-17.0.1-25-g098e653a5bed

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.1-25-g098e653a5bed.

PR: 273753
MFC after: 1 month


# 06c3fb27 02-Sep-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the
last commit before the upstream release/17.x branch was created.

PR: 273753
MFC after: 1 month


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

# bdd1243d 14-Apr-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-16-init-18548-gb0daacf58f41

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16-init-18548-gb0daacf58f41.

PR: 271047
MFC after: 1 month


# 4dc3b1fa 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Revert "Ensure .inc files are regenerated when llvm/clang tblgen binaries change"

This reverts commit ab80f0b21fbb9c44d40e6f7a99090188f4ed2f71. The intent
of this change was to avoid possible compilation errors when certain
.inc files were not regenerated, but the method turns out to cause way
more rebuilds than anticipated. Another method will have to be found,
and in the mean time, WITH_CLEAN is the solution that always works.

Fixes: ab80f0b21fbb

# d8ed7fa3 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Revert "Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed"

This reverts commit 8f391d9098083044793ff036dff8c96930fb1553. There are
still a bunch of problems, and apparently ${.ALLSRC} does not work as I
expected.

Fixes: 8f391d909808

# 8f391d90 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed

This flag ensures that the tblgen tools do not actually touch the
produced .inc file, if there are no changes to the contents. In turn,
this may prevent a number of rebuilds of files that include such .inc
files, saving build time.

While here, ensure that the shell invocations to locate the used tblgen
binary do not show unnecessary error messages.

Reported by: des
MFC after: 1 week

# ab80f0b2 25-Feb-2023 Dimitry Andric <dim@FreeBSD.org>

Ensure .inc files are regenerated when llvm/clang tblgen binaries change

When doing a fully incremental build (with WITHOUT_CLEAN enabled), from
a commit before llvm 15 was merged (3264f6b88fce), to a commit after
that, a number of .inc files were not regenerated. This could lead to
unexpected compilation errors when these .inc files were included from
llvm-project sources, similar to:

In file included from /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:8268:
/usr/obj/usr/src/amd64.amd64/lib/clang/libclang/clang/Basic/arm_mve_builtin_cg.inc:279:18: error: no matching constructor for initialization of 'clang::CodeGen::Address'
Address Val2 = Address(Val1, CharUnits::fromQuantity(2));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Work around this by making the .inc files dependent on the tblgen binary
used for generating them. E.g., we can relatively safely assume that if
the binary gets updated, the .inc files must also be updated. (Although
this is not 100% optimal, the gain by complicating things even more is
probaby not worth the effort.)

MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38770

# 50d7464c 14-Jan-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6.

PR: 265425
MFC after: 2 weeks


# f3fd488f 04-Dec-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.6-0-g088f33605d8a.

PR: 265425
MFC after: 2 weeks


# 6246ae0b 16-Oct-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.2-10-gf3c5289e7846.

PR: 265425
MFC after: 2 weeks


# 753f127f 14-Jul-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-16436-g18a6ab5b8d1f.

PR: 265425
MFC after: 2 weeks


# 81ad6265 04-Jul-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-15358-g53dc0f10787.

PR: 265425
MFC after: 2 weeks


# 56f451bb 12-Jun-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR: 261742
MFC after: 3 days


# 809922b0 05-Jun-2022 Dimitry Andric <dim@FreeBSD.org>

Update rest of llvm-project build glue for 14.0.4

I completely forgot about updating the generated llvm-project config
files, which also contain version numbers, etc. Sorry for the churn.

PR: 261742
Fixes: ab9d54731f43
MFC after: 3 days

# 3a9a9c0c 28-Apr-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.3-0-g1f9140064dfb.

PR: 261742
MFC after: 2 weeks


# 04eeddc0 27-Jan-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR: 261742
MFC after: 2 weeks


# 5e801ac6 20-Nov-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR: 261742
MFC after: 2 weeks


# fe6060f1 22-Aug-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR: 258209
MFC after: 2 weeks


# 23408297 18-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project 12.0.1 rc2

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2.

PR: 255570
MFC after: 6 weeks


# e8d8bef9 13-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the
upstream release/12.x branch was created.

PR: 255570
MFC after: 6 weeks


# eaeb601b 03-Jan-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after: 4 weeks
X-MFC-With: r364284


# 9a282b3e 07-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Re-add generated arm_neon.h header, which was accidentally dropped while
refactoring lib/clang/headers/Makefile in r363984.

# 48aaf27b 06-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Update Makefiles under lib/clang and usr.bin/clang for 11.0.0 builds,
and also bump the version in the mtree files.

# d65cd7a5 23-May-2020 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1).

MFC after: 3 weeks


# 9771cac2 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Update build glue for a minimal build of the clang executable.

# 0b37c159 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

* Bump version numbers to 10.0.0
* Update UPDATING
* Update (Optional)ObsoleteFiles.inc
* Update VCS(Revision|Version) files
* Update generated config headers
* Update clang internal headers Makefile

# c14a5a88 22-Dec-2019 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
9.0.1 final release c1a0a213378a458fbea1a5c77b315c7dce08fd05.

Release notes for llvm, clang, lld and libc++ 9.0.1 will become
available here:

https://releases.llvm.org/9.0.1/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/clang/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/lld/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/projects/libcxx/docs/ReleaseNotes.html

PR: 240629
MFC after: 1 month


# 2f3724e6 31-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Update Makefile and mtree for clang internal headers, and update
OptionalObsoleteFiles.inc for added and removed files.

# 72e1e271 23-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Change clang lib dir to 9.0.0.

# efc5c442 12-Jun-2019 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,
libunwind and openmp to the upstream release_80 branch r363030
(effectively, 8.0.1 rc2). The 8.0.1 release should follow this within a
week or so.

MFC after: 2 weeks


# 0bf31f1f 20-Jan-2019 Dimitry Andric <dim@FreeBSD.org>

Update version numbers, and regenerate config headers for llvm, clang,
lld and lldb. Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc.

# 68948600 04-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch
r346007 (effectively 7.0.1 rc2), resolve conflicts, and bump version
numbers.

PR: 230240, 230355


# 611d080e 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update clang intrinsics headers.

# 6dfa117f 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update llvm/clang version numbers in various files.

# 55458465 30-Jun-2018 Dimitry Andric <dim@FreeBSD.org>

More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to
update mtree files, ObsoleteFiles and a number of other paths. Sorry
about all the breakage.

Pointy hat to: me
MFC after: 2 weeks
X-MFC-With: r335799

# fe4fed2e 28-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,
update build glue and version numbers, add new intrinsics headers, and
update OptionalObsoleteFiles.inc.


# cd8e0f1f 20-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Add new clang intrinsics headers, and update version number.

# d4419f6f 02-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch. This corresponds to 5.0.1 rc2.

MFC after: 2 weeks


# 302affcb 29-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and update
build glue.


# 68e19318 09-May-2017 Dimitry Andric <dim@FreeBSD.org>

Add new LWP intrinsics header, and an option to install internal clang
headers which have the same name as our system headers, and might
conflict with them. (It is a work in progress to make these fully
compatible.)

# f849be8a 16-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Add preliminary UPDATING and ObsoleteFiles.inc entries. Also add one
new intrinsics header.

# 5897d2f0 17-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Initial update of clang/llvm build glue, for building just a minimal
clang executable.

# 53fe1d28 05-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Adjust version numbers for the clang library directory.

# 09bfd043 03-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Initial updates to llvm/clang build glue.

# 5042637b 02-Dec-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for clang 3.9.1 r288513.

# 5b41a5b6 25-Nov-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for llvm/clang 3.9.1.

# 986e05bc 26-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Completely revamp the way llvm, clang and lldb are built.

* Bootstrap llvm-tblgen and clang-tblgen with a minimal llvm static
library, that has no other dependencies.
* Roll up all separate llvm libraries into one big static libllvm.
* Similar for all separate clang and lldb static libraries.
* For all these libraries, generate their .inc files only once.
* Link all llvm tools (including extra) against the big libllvm.
* Link clang and clang-format against the big libllvm and libclang.
* Link lldb against the big libllvm, libclang and liblldb.

N.B.: This is work in progress, some details may still be missing.

It also heavily depends on bsd.*.mk's support for SRCS and DPSRCS with
relative pathnames, which apparently does not always work as expected.
For building llvm, clang and lldb though, it seems to work just fine.

The main idea behind this restructuring is maintainability and build
peformance. The previous large number of very small libraries, each
with their own generated files and dependencies was slow to traverse
and hard to understand.

Possible future improvements:
* Only build certain targets, e.g. for most regular users having just
one target will be fine. This will shave off some build time.
* Building the big llvm, clang and lldb libraries as shared (private)
libraries.
* Adding other components from the LLVM project, such as lld.

# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# bdd1243d 14-Apr-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-16-init-18548-gb0daacf58f41

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16-init-18548-gb0daacf58f41.

PR: 271047
MFC after: 1 month


# 4dc3b1fa 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Revert "Ensure .inc files are regenerated when llvm/clang tblgen binaries change"

This reverts commit ab80f0b21fbb9c44d40e6f7a99090188f4ed2f71. The intent
of this change was to avoid possible compilation errors when certain
.inc files were not regenerated, but the method turns out to cause way
more rebuilds than anticipated. Another method will have to be found,
and in the mean time, WITH_CLEAN is the solution that always works.

Fixes: ab80f0b21fbb

# d8ed7fa3 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Revert "Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed"

This reverts commit 8f391d9098083044793ff036dff8c96930fb1553. There are
still a bunch of problems, and apparently ${.ALLSRC} does not work as I
expected.

Fixes: 8f391d909808

# 8f391d90 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed

This flag ensures that the tblgen tools do not actually touch the
produced .inc file, if there are no changes to the contents. In turn,
this may prevent a number of rebuilds of files that include such .inc
files, saving build time.

While here, ensure that the shell invocations to locate the used tblgen
binary do not show unnecessary error messages.

Reported by: des
MFC after: 1 week

# ab80f0b2 25-Feb-2023 Dimitry Andric <dim@FreeBSD.org>

Ensure .inc files are regenerated when llvm/clang tblgen binaries change

When doing a fully incremental build (with WITHOUT_CLEAN enabled), from
a commit before llvm 15 was merged (3264f6b88fce), to a commit after
that, a number of .inc files were not regenerated. This could lead to
unexpected compilation errors when these .inc files were included from
llvm-project sources, similar to:

In file included from /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:8268:
/usr/obj/usr/src/amd64.amd64/lib/clang/libclang/clang/Basic/arm_mve_builtin_cg.inc:279:18: error: no matching constructor for initialization of 'clang::CodeGen::Address'
Address Val2 = Address(Val1, CharUnits::fromQuantity(2));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Work around this by making the .inc files dependent on the tblgen binary
used for generating them. E.g., we can relatively safely assume that if
the binary gets updated, the .inc files must also be updated. (Although
this is not 100% optimal, the gain by complicating things even more is
probaby not worth the effort.)

MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38770

# 50d7464c 14-Jan-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6.

PR: 265425
MFC after: 2 weeks


# f3fd488f 04-Dec-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.6-0-g088f33605d8a.

PR: 265425
MFC after: 2 weeks


# 6246ae0b 16-Oct-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.2-10-gf3c5289e7846.

PR: 265425
MFC after: 2 weeks


# 753f127f 14-Jul-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-16436-g18a6ab5b8d1f.

PR: 265425
MFC after: 2 weeks


# 81ad6265 04-Jul-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-15358-g53dc0f10787.

PR: 265425
MFC after: 2 weeks


# 56f451bb 12-Jun-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR: 261742
MFC after: 3 days


# 809922b0 05-Jun-2022 Dimitry Andric <dim@FreeBSD.org>

Update rest of llvm-project build glue for 14.0.4

I completely forgot about updating the generated llvm-project config
files, which also contain version numbers, etc. Sorry for the churn.

PR: 261742
Fixes: ab9d54731f43
MFC after: 3 days

# 3a9a9c0c 28-Apr-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.3-0-g1f9140064dfb.

PR: 261742
MFC after: 2 weeks


# 04eeddc0 27-Jan-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR: 261742
MFC after: 2 weeks


# 5e801ac6 20-Nov-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR: 261742
MFC after: 2 weeks


# fe6060f1 22-Aug-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR: 258209
MFC after: 2 weeks


# 23408297 18-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project 12.0.1 rc2

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2.

PR: 255570
MFC after: 6 weeks


# e8d8bef9 13-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the
upstream release/12.x branch was created.

PR: 255570
MFC after: 6 weeks


# eaeb601b 03-Jan-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after: 4 weeks
X-MFC-With: r364284


# 9a282b3e 07-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Re-add generated arm_neon.h header, which was accidentally dropped while
refactoring lib/clang/headers/Makefile in r363984.

# 48aaf27b 06-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Update Makefiles under lib/clang and usr.bin/clang for 11.0.0 builds,
and also bump the version in the mtree files.

# d65cd7a5 23-May-2020 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1).

MFC after: 3 weeks


# 9771cac2 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Update build glue for a minimal build of the clang executable.

# 0b37c159 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

* Bump version numbers to 10.0.0
* Update UPDATING
* Update (Optional)ObsoleteFiles.inc
* Update VCS(Revision|Version) files
* Update generated config headers
* Update clang internal headers Makefile

# c14a5a88 22-Dec-2019 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
9.0.1 final release c1a0a213378a458fbea1a5c77b315c7dce08fd05.

Release notes for llvm, clang, lld and libc++ 9.0.1 will become
available here:

https://releases.llvm.org/9.0.1/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/clang/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/lld/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/projects/libcxx/docs/ReleaseNotes.html

PR: 240629
MFC after: 1 month


# 2f3724e6 31-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Update Makefile and mtree for clang internal headers, and update
OptionalObsoleteFiles.inc for added and removed files.

# 72e1e271 23-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Change clang lib dir to 9.0.0.

# efc5c442 12-Jun-2019 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,
libunwind and openmp to the upstream release_80 branch r363030
(effectively, 8.0.1 rc2). The 8.0.1 release should follow this within a
week or so.

MFC after: 2 weeks


# 0bf31f1f 20-Jan-2019 Dimitry Andric <dim@FreeBSD.org>

Update version numbers, and regenerate config headers for llvm, clang,
lld and lldb. Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc.

# 68948600 04-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch
r346007 (effectively 7.0.1 rc2), resolve conflicts, and bump version
numbers.

PR: 230240, 230355


# 611d080e 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update clang intrinsics headers.

# 6dfa117f 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update llvm/clang version numbers in various files.

# 55458465 30-Jun-2018 Dimitry Andric <dim@FreeBSD.org>

More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to
update mtree files, ObsoleteFiles and a number of other paths. Sorry
about all the breakage.

Pointy hat to: me
MFC after: 2 weeks
X-MFC-With: r335799

# fe4fed2e 28-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,
update build glue and version numbers, add new intrinsics headers, and
update OptionalObsoleteFiles.inc.


# cd8e0f1f 20-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Add new clang intrinsics headers, and update version number.

# d4419f6f 02-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch. This corresponds to 5.0.1 rc2.

MFC after: 2 weeks


# 302affcb 29-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and update
build glue.


# 68e19318 09-May-2017 Dimitry Andric <dim@FreeBSD.org>

Add new LWP intrinsics header, and an option to install internal clang
headers which have the same name as our system headers, and might
conflict with them. (It is a work in progress to make these fully
compatible.)

# f849be8a 16-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Add preliminary UPDATING and ObsoleteFiles.inc entries. Also add one
new intrinsics header.

# 5897d2f0 17-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Initial update of clang/llvm build glue, for building just a minimal
clang executable.

# 53fe1d28 05-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Adjust version numbers for the clang library directory.

# 09bfd043 03-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Initial updates to llvm/clang build glue.

# 5042637b 02-Dec-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for clang 3.9.1 r288513.

# 5b41a5b6 25-Nov-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for llvm/clang 3.9.1.

# 986e05bc 26-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Completely revamp the way llvm, clang and lldb are built.

* Bootstrap llvm-tblgen and clang-tblgen with a minimal llvm static
library, that has no other dependencies.
* Roll up all separate llvm libraries into one big static libllvm.
* Similar for all separate clang and lldb static libraries.
* For all these libraries, generate their .inc files only once.
* Link all llvm tools (including extra) against the big libllvm.
* Link clang and clang-format against the big libllvm and libclang.
* Link lldb against the big libllvm, libclang and liblldb.

N.B.: This is work in progress, some details may still be missing.

It also heavily depends on bsd.*.mk's support for SRCS and DPSRCS with
relative pathnames, which apparently does not always work as expected.
For building llvm, clang and lldb though, it seems to work just fine.

The main idea behind this restructuring is maintainability and build
peformance. The previous large number of very small libraries, each
with their own generated files and dependencies was slow to traverse
and hard to understand.

Possible future improvements:
* Only build certain targets, e.g. for most regular users having just
one target will be fine. This will shave off some build time.
* Building the big llvm, clang and lldb libraries as shared (private)
libraries.
* Adding other components from the LLVM project, such as lld.

# 4dc3b1fa 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Revert "Ensure .inc files are regenerated when llvm/clang tblgen binaries change"

This reverts commit ab80f0b21fbb9c44d40e6f7a99090188f4ed2f71. The intent
of this change was to avoid possible compilation errors when certain
.inc files were not regenerated, but the method turns out to cause way
more rebuilds than anticipated. Another method will have to be found,
and in the mean time, WITH_CLEAN is the solution that always works.

Fixes: ab80f0b21fbb


# d8ed7fa3 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Revert "Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed"

This reverts commit 8f391d9098083044793ff036dff8c96930fb1553. There are
still a bunch of problems, and apparently ${.ALLSRC} does not work as I
expected.

Fixes: 8f391d909808


# 8f391d90 29-Mar-2023 Dimitry Andric <dim@FreeBSD.org>

Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed

This flag ensures that the tblgen tools do not actually touch the
produced .inc file, if there are no changes to the contents. In turn,
this may prevent a number of rebuilds of files that include such .inc
files, saving build time.

While here, ensure that the shell invocations to locate the used tblgen
binary do not show unnecessary error messages.

Reported by: des
MFC after: 1 week


# ab80f0b2 25-Feb-2023 Dimitry Andric <dim@FreeBSD.org>

Ensure .inc files are regenerated when llvm/clang tblgen binaries change

When doing a fully incremental build (with WITHOUT_CLEAN enabled), from
a commit before llvm 15 was merged (3264f6b88fce), to a commit after
that, a number of .inc files were not regenerated. This could lead to
unexpected compilation errors when these .inc files were included from
llvm-project sources, similar to:

In file included from /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:8268:
/usr/obj/usr/src/amd64.amd64/lib/clang/libclang/clang/Basic/arm_mve_builtin_cg.inc:279:18: error: no matching constructor for initialization of 'clang::CodeGen::Address'
Address Val2 = Address(Val1, CharUnits::fromQuantity(2));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Work around this by making the .inc files dependent on the tblgen binary
used for generating them. E.g., we can relatively safely assume that if
the binary gets updated, the .inc files must also be updated. (Although
this is not 100% optimal, the gain by complicating things even more is
probaby not worth the effort.)

MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38770


# 50d7464c 14-Jan-2023 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6.

PR: 265425
MFC after: 2 weeks


# f3fd488f 04-Dec-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.6-0-g088f33605d8a.

PR: 265425
MFC after: 2 weeks


# 6246ae0b 16-Oct-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.2-10-gf3c5289e7846.

PR: 265425
MFC after: 2 weeks


# 753f127f 14-Jul-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-16436-g18a6ab5b8d1f.

PR: 265425
MFC after: 2 weeks


# 81ad6265 04-Jul-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-15358-g53dc0f10787.

PR: 265425
MFC after: 2 weeks


# 56f451bb 12-Jun-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR: 261742
MFC after: 3 days


# 809922b0 05-Jun-2022 Dimitry Andric <dim@FreeBSD.org>

Update rest of llvm-project build glue for 14.0.4

I completely forgot about updating the generated llvm-project config
files, which also contain version numbers, etc. Sorry for the churn.

PR: 261742
Fixes: ab9d54731f43
MFC after: 3 days

# 3a9a9c0c 28-Apr-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.3-0-g1f9140064dfb.

PR: 261742
MFC after: 2 weeks


# 04eeddc0 27-Jan-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR: 261742
MFC after: 2 weeks


# 5e801ac6 20-Nov-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR: 261742
MFC after: 2 weeks


# fe6060f1 22-Aug-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR: 258209
MFC after: 2 weeks


# 23408297 18-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project 12.0.1 rc2

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2.

PR: 255570
MFC after: 6 weeks


# e8d8bef9 13-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the
upstream release/12.x branch was created.

PR: 255570
MFC after: 6 weeks


# eaeb601b 03-Jan-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after: 4 weeks
X-MFC-With: r364284


# 9a282b3e 07-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Re-add generated arm_neon.h header, which was accidentally dropped while
refactoring lib/clang/headers/Makefile in r363984.

# 48aaf27b 06-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Update Makefiles under lib/clang and usr.bin/clang for 11.0.0 builds,
and also bump the version in the mtree files.

# d65cd7a5 23-May-2020 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1).

MFC after: 3 weeks


# 9771cac2 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Update build glue for a minimal build of the clang executable.

# 0b37c159 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

* Bump version numbers to 10.0.0
* Update UPDATING
* Update (Optional)ObsoleteFiles.inc
* Update VCS(Revision|Version) files
* Update generated config headers
* Update clang internal headers Makefile

# c14a5a88 22-Dec-2019 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
9.0.1 final release c1a0a213378a458fbea1a5c77b315c7dce08fd05.

Release notes for llvm, clang, lld and libc++ 9.0.1 will become
available here:

https://releases.llvm.org/9.0.1/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/clang/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/lld/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/projects/libcxx/docs/ReleaseNotes.html

PR: 240629
MFC after: 1 month


# 2f3724e6 31-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Update Makefile and mtree for clang internal headers, and update
OptionalObsoleteFiles.inc for added and removed files.

# 72e1e271 23-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Change clang lib dir to 9.0.0.

# efc5c442 12-Jun-2019 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,
libunwind and openmp to the upstream release_80 branch r363030
(effectively, 8.0.1 rc2). The 8.0.1 release should follow this within a
week or so.

MFC after: 2 weeks


# 0bf31f1f 20-Jan-2019 Dimitry Andric <dim@FreeBSD.org>

Update version numbers, and regenerate config headers for llvm, clang,
lld and lldb. Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc.

# 68948600 04-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch
r346007 (effectively 7.0.1 rc2), resolve conflicts, and bump version
numbers.

PR: 230240, 230355


# 611d080e 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update clang intrinsics headers.

# 6dfa117f 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update llvm/clang version numbers in various files.

# 55458465 30-Jun-2018 Dimitry Andric <dim@FreeBSD.org>

More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to
update mtree files, ObsoleteFiles and a number of other paths. Sorry
about all the breakage.

Pointy hat to: me
MFC after: 2 weeks
X-MFC-With: r335799

# fe4fed2e 28-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,
update build glue and version numbers, add new intrinsics headers, and
update OptionalObsoleteFiles.inc.


# cd8e0f1f 20-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Add new clang intrinsics headers, and update version number.

# d4419f6f 02-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch. This corresponds to 5.0.1 rc2.

MFC after: 2 weeks


# 302affcb 29-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and update
build glue.


# 68e19318 09-May-2017 Dimitry Andric <dim@FreeBSD.org>

Add new LWP intrinsics header, and an option to install internal clang
headers which have the same name as our system headers, and might
conflict with them. (It is a work in progress to make these fully
compatible.)

# f849be8a 16-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Add preliminary UPDATING and ObsoleteFiles.inc entries. Also add one
new intrinsics header.

# 5897d2f0 17-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Initial update of clang/llvm build glue, for building just a minimal
clang executable.

# 53fe1d28 05-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Adjust version numbers for the clang library directory.

# 09bfd043 03-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Initial updates to llvm/clang build glue.

# 5042637b 02-Dec-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for clang 3.9.1 r288513.

# 5b41a5b6 25-Nov-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for llvm/clang 3.9.1.

# 986e05bc 26-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Completely revamp the way llvm, clang and lldb are built.

* Bootstrap llvm-tblgen and clang-tblgen with a minimal llvm static
library, that has no other dependencies.
* Roll up all separate llvm libraries into one big static libllvm.
* Similar for all separate clang and lldb static libraries.
* For all these libraries, generate their .inc files only once.
* Link all llvm tools (including extra) against the big libllvm.
* Link clang and clang-format against the big libllvm and libclang.
* Link lldb against the big libllvm, libclang and liblldb.

N.B.: This is work in progress, some details may still be missing.

It also heavily depends on bsd.*.mk's support for SRCS and DPSRCS with
relative pathnames, which apparently does not always work as expected.
For building llvm, clang and lldb though, it seems to work just fine.

The main idea behind this restructuring is maintainability and build
peformance. The previous large number of very small libraries, each
with their own generated files and dependencies was slow to traverse
and hard to understand.

Possible future improvements:
* Only build certain targets, e.g. for most regular users having just
one target will be fine. This will shave off some build time.
* Building the big llvm, clang and lldb libraries as shared (private)
libraries.
* Adding other components from the LLVM project, such as lld.

# 56f451bb 12-Jun-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR: 261742
MFC after: 3 days


# 809922b0 05-Jun-2022 Dimitry Andric <dim@FreeBSD.org>

Update rest of llvm-project build glue for 14.0.4

I completely forgot about updating the generated llvm-project config
files, which also contain version numbers, etc. Sorry for the churn.

PR: 261742
Fixes: ab9d54731f43
MFC after: 3 days

# 3a9a9c0c 28-Apr-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.3-0-g1f9140064dfb.

PR: 261742
MFC after: 2 weeks


# 04eeddc0 27-Jan-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR: 261742
MFC after: 2 weeks


# 5e801ac6 20-Nov-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR: 261742
MFC after: 2 weeks


# fe6060f1 22-Aug-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR: 258209
MFC after: 2 weeks


# 23408297 18-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project 12.0.1 rc2

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2.

PR: 255570
MFC after: 6 weeks


# e8d8bef9 13-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the
upstream release/12.x branch was created.

PR: 255570
MFC after: 6 weeks


# eaeb601b 03-Jan-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after: 4 weeks
X-MFC-With: r364284


# 9a282b3e 07-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Re-add generated arm_neon.h header, which was accidentally dropped while
refactoring lib/clang/headers/Makefile in r363984.

# 48aaf27b 06-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Update Makefiles under lib/clang and usr.bin/clang for 11.0.0 builds,
and also bump the version in the mtree files.

# d65cd7a5 23-May-2020 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1).

MFC after: 3 weeks


# 9771cac2 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Update build glue for a minimal build of the clang executable.

# 0b37c159 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

* Bump version numbers to 10.0.0
* Update UPDATING
* Update (Optional)ObsoleteFiles.inc
* Update VCS(Revision|Version) files
* Update generated config headers
* Update clang internal headers Makefile

# c14a5a88 22-Dec-2019 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
9.0.1 final release c1a0a213378a458fbea1a5c77b315c7dce08fd05.

Release notes for llvm, clang, lld and libc++ 9.0.1 will become
available here:

https://releases.llvm.org/9.0.1/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/clang/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/lld/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/projects/libcxx/docs/ReleaseNotes.html

PR: 240629
MFC after: 1 month


# 2f3724e6 31-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Update Makefile and mtree for clang internal headers, and update
OptionalObsoleteFiles.inc for added and removed files.

# 72e1e271 23-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Change clang lib dir to 9.0.0.

# efc5c442 12-Jun-2019 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,
libunwind and openmp to the upstream release_80 branch r363030
(effectively, 8.0.1 rc2). The 8.0.1 release should follow this within a
week or so.

MFC after: 2 weeks


# 0bf31f1f 20-Jan-2019 Dimitry Andric <dim@FreeBSD.org>

Update version numbers, and regenerate config headers for llvm, clang,
lld and lldb. Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc.

# 68948600 04-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch
r346007 (effectively 7.0.1 rc2), resolve conflicts, and bump version
numbers.

PR: 230240, 230355


# 611d080e 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update clang intrinsics headers.

# 6dfa117f 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update llvm/clang version numbers in various files.

# 55458465 30-Jun-2018 Dimitry Andric <dim@FreeBSD.org>

More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to
update mtree files, ObsoleteFiles and a number of other paths. Sorry
about all the breakage.

Pointy hat to: me
MFC after: 2 weeks
X-MFC-With: r335799

# fe4fed2e 28-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,
update build glue and version numbers, add new intrinsics headers, and
update OptionalObsoleteFiles.inc.


# cd8e0f1f 20-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Add new clang intrinsics headers, and update version number.

# d4419f6f 02-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch. This corresponds to 5.0.1 rc2.

MFC after: 2 weeks


# 302affcb 29-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and update
build glue.


# 68e19318 09-May-2017 Dimitry Andric <dim@FreeBSD.org>

Add new LWP intrinsics header, and an option to install internal clang
headers which have the same name as our system headers, and might
conflict with them. (It is a work in progress to make these fully
compatible.)

# f849be8a 16-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Add preliminary UPDATING and ObsoleteFiles.inc entries. Also add one
new intrinsics header.

# 5897d2f0 17-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Initial update of clang/llvm build glue, for building just a minimal
clang executable.

# 53fe1d28 05-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Adjust version numbers for the clang library directory.

# 09bfd043 03-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Initial updates to llvm/clang build glue.

# 5042637b 02-Dec-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for clang 3.9.1 r288513.

# 5b41a5b6 25-Nov-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for llvm/clang 3.9.1.

# 986e05bc 26-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Completely revamp the way llvm, clang and lldb are built.

* Bootstrap llvm-tblgen and clang-tblgen with a minimal llvm static
library, that has no other dependencies.
* Roll up all separate llvm libraries into one big static libllvm.
* Similar for all separate clang and lldb static libraries.
* For all these libraries, generate their .inc files only once.
* Link all llvm tools (including extra) against the big libllvm.
* Link clang and clang-format against the big libllvm and libclang.
* Link lldb against the big libllvm, libclang and liblldb.

N.B.: This is work in progress, some details may still be missing.

It also heavily depends on bsd.*.mk's support for SRCS and DPSRCS with
relative pathnames, which apparently does not always work as expected.
For building llvm, clang and lldb though, it seems to work just fine.

The main idea behind this restructuring is maintainability and build
peformance. The previous large number of very small libraries, each
with their own generated files and dependencies was slow to traverse
and hard to understand.

Possible future improvements:
* Only build certain targets, e.g. for most regular users having just
one target will be fine. This will shave off some build time.
* Building the big llvm, clang and lldb libraries as shared (private)
libraries.
* Adding other components from the LLVM project, such as lld.

# 809922b0 05-Jun-2022 Dimitry Andric <dim@FreeBSD.org>

Update rest of llvm-project build glue for 14.0.4

I completely forgot about updating the generated llvm-project config
files, which also contain version numbers, etc. Sorry for the churn.

PR: 261742
Fixes: ab9d54731f43
MFC after: 3 days


# 3a9a9c0c 28-Apr-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.3-0-g1f9140064dfb.

PR: 261742
MFC after: 2 weeks


# 04eeddc0 27-Jan-2022 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR: 261742
MFC after: 2 weeks


# 5e801ac6 20-Nov-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR: 261742
MFC after: 2 weeks


# fe6060f1 22-Aug-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR: 258209
MFC after: 2 weeks


# 23408297 18-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project 12.0.1 rc2

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2.

PR: 255570
MFC after: 6 weeks


# e8d8bef9 13-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the
upstream release/12.x branch was created.

PR: 255570
MFC after: 6 weeks


# eaeb601b 03-Jan-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after: 4 weeks
X-MFC-With: r364284


# 9a282b3e 07-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Re-add generated arm_neon.h header, which was accidentally dropped while
refactoring lib/clang/headers/Makefile in r363984.

# 48aaf27b 06-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Update Makefiles under lib/clang and usr.bin/clang for 11.0.0 builds,
and also bump the version in the mtree files.

# d65cd7a5 23-May-2020 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1).

MFC after: 3 weeks


# 9771cac2 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Update build glue for a minimal build of the clang executable.

# 0b37c159 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

* Bump version numbers to 10.0.0
* Update UPDATING
* Update (Optional)ObsoleteFiles.inc
* Update VCS(Revision|Version) files
* Update generated config headers
* Update clang internal headers Makefile

# c14a5a88 22-Dec-2019 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
9.0.1 final release c1a0a213378a458fbea1a5c77b315c7dce08fd05.

Release notes for llvm, clang, lld and libc++ 9.0.1 will become
available here:

https://releases.llvm.org/9.0.1/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/clang/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/lld/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/projects/libcxx/docs/ReleaseNotes.html

PR: 240629
MFC after: 1 month


# 2f3724e6 31-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Update Makefile and mtree for clang internal headers, and update
OptionalObsoleteFiles.inc for added and removed files.

# 72e1e271 23-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Change clang lib dir to 9.0.0.

# efc5c442 12-Jun-2019 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,
libunwind and openmp to the upstream release_80 branch r363030
(effectively, 8.0.1 rc2). The 8.0.1 release should follow this within a
week or so.

MFC after: 2 weeks


# 0bf31f1f 20-Jan-2019 Dimitry Andric <dim@FreeBSD.org>

Update version numbers, and regenerate config headers for llvm, clang,
lld and lldb. Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc.

# 68948600 04-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch
r346007 (effectively 7.0.1 rc2), resolve conflicts, and bump version
numbers.

PR: 230240, 230355


# 611d080e 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update clang intrinsics headers.

# 6dfa117f 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update llvm/clang version numbers in various files.

# 55458465 30-Jun-2018 Dimitry Andric <dim@FreeBSD.org>

More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to
update mtree files, ObsoleteFiles and a number of other paths. Sorry
about all the breakage.

Pointy hat to: me
MFC after: 2 weeks
X-MFC-With: r335799

# fe4fed2e 28-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,
update build glue and version numbers, add new intrinsics headers, and
update OptionalObsoleteFiles.inc.


# cd8e0f1f 20-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Add new clang intrinsics headers, and update version number.

# d4419f6f 02-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch. This corresponds to 5.0.1 rc2.

MFC after: 2 weeks


# 302affcb 29-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and update
build glue.


# 68e19318 09-May-2017 Dimitry Andric <dim@FreeBSD.org>

Add new LWP intrinsics header, and an option to install internal clang
headers which have the same name as our system headers, and might
conflict with them. (It is a work in progress to make these fully
compatible.)

# f849be8a 16-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Add preliminary UPDATING and ObsoleteFiles.inc entries. Also add one
new intrinsics header.

# 5897d2f0 17-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Initial update of clang/llvm build glue, for building just a minimal
clang executable.

# 53fe1d28 05-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Adjust version numbers for the clang library directory.

# 09bfd043 03-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Initial updates to llvm/clang build glue.

# 5042637b 02-Dec-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for clang 3.9.1 r288513.

# 5b41a5b6 25-Nov-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for llvm/clang 3.9.1.

# 986e05bc 26-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Completely revamp the way llvm, clang and lldb are built.

* Bootstrap llvm-tblgen and clang-tblgen with a minimal llvm static
library, that has no other dependencies.
* Roll up all separate llvm libraries into one big static libllvm.
* Similar for all separate clang and lldb static libraries.
* For all these libraries, generate their .inc files only once.
* Link all llvm tools (including extra) against the big libllvm.
* Link clang and clang-format against the big libllvm and libclang.
* Link lldb against the big libllvm, libclang and liblldb.

N.B.: This is work in progress, some details may still be missing.

It also heavily depends on bsd.*.mk's support for SRCS and DPSRCS with
relative pathnames, which apparently does not always work as expected.
For building llvm, clang and lldb though, it seems to work just fine.

The main idea behind this restructuring is maintainability and build
peformance. The previous large number of very small libraries, each
with their own generated files and dependencies was slow to traverse
and hard to understand.

Possible future improvements:
* Only build certain targets, e.g. for most regular users having just
one target will be fine. This will shave off some build time.
* Building the big llvm, clang and lldb libraries as shared (private)
libraries.
* Adding other components from the LLVM project, such as lld.

# fe6060f1 22-Aug-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR: 258209
MFC after: 2 weeks


# 23408297 18-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project 12.0.1 rc2

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2.

PR: 255570
MFC after: 6 weeks


# e8d8bef9 13-Jun-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the
upstream release/12.x branch was created.

PR: 255570
MFC after: 6 weeks


# eaeb601b 03-Jan-2021 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after: 4 weeks
X-MFC-With: r364284


# 9a282b3e 07-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Re-add generated arm_neon.h header, which was accidentally dropped while
refactoring lib/clang/headers/Makefile in r363984.

# 48aaf27b 06-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Update Makefiles under lib/clang and usr.bin/clang for 11.0.0 builds,
and also bump the version in the mtree files.

# d65cd7a5 23-May-2020 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1).

MFC after: 3 weeks


# 9771cac2 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Update build glue for a minimal build of the clang executable.

# 0b37c159 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

* Bump version numbers to 10.0.0
* Update UPDATING
* Update (Optional)ObsoleteFiles.inc
* Update VCS(Revision|Version) files
* Update generated config headers
* Update clang internal headers Makefile

# c14a5a88 22-Dec-2019 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
9.0.1 final release c1a0a213378a458fbea1a5c77b315c7dce08fd05.

Release notes for llvm, clang, lld and libc++ 9.0.1 will become
available here:

https://releases.llvm.org/9.0.1/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/clang/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/tools/lld/docs/ReleaseNotes.html
https://releases.llvm.org/9.0.1/projects/libcxx/docs/ReleaseNotes.html

PR: 240629
MFC after: 1 month


# 2f3724e6 31-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Update Makefile and mtree for clang internal headers, and update
OptionalObsoleteFiles.inc for added and removed files.

# 72e1e271 23-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Change clang lib dir to 9.0.0.

# efc5c442 12-Jun-2019 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,
libunwind and openmp to the upstream release_80 branch r363030
(effectively, 8.0.1 rc2). The 8.0.1 release should follow this within a
week or so.

MFC after: 2 weeks


# 0bf31f1f 20-Jan-2019 Dimitry Andric <dim@FreeBSD.org>

Update version numbers, and regenerate config headers for llvm, clang,
lld and lldb. Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc.

# 68948600 04-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch
r346007 (effectively 7.0.1 rc2), resolve conflicts, and bump version
numbers.

PR: 230240, 230355


# 611d080e 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update clang intrinsics headers.

# 6dfa117f 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update llvm/clang version numbers in various files.

# 55458465 30-Jun-2018 Dimitry Andric <dim@FreeBSD.org>

More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to
update mtree files, ObsoleteFiles and a number of other paths. Sorry
about all the breakage.

Pointy hat to: me
MFC after: 2 weeks
X-MFC-With: r335799

# fe4fed2e 28-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,
update build glue and version numbers, add new intrinsics headers, and
update OptionalObsoleteFiles.inc.


# cd8e0f1f 20-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Add new clang intrinsics headers, and update version number.

# d4419f6f 02-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch. This corresponds to 5.0.1 rc2.

MFC after: 2 weeks


# 302affcb 29-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and update
build glue.


# 68e19318 09-May-2017 Dimitry Andric <dim@FreeBSD.org>

Add new LWP intrinsics header, and an option to install internal clang
headers which have the same name as our system headers, and might
conflict with them. (It is a work in progress to make these fully
compatible.)

# f849be8a 16-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Add preliminary UPDATING and ObsoleteFiles.inc entries. Also add one
new intrinsics header.

# 5897d2f0 17-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Initial update of clang/llvm build glue, for building just a minimal
clang executable.

# 53fe1d28 05-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Adjust version numbers for the clang library directory.

# 09bfd043 03-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Initial updates to llvm/clang build glue.

# 5042637b 02-Dec-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for clang 3.9.1 r288513.

# 5b41a5b6 25-Nov-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for llvm/clang 3.9.1.

# 986e05bc 26-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Completely revamp the way llvm, clang and lldb are built.

* Bootstrap llvm-tblgen and clang-tblgen with a minimal llvm static
library, that has no other dependencies.
* Roll up all separate llvm libraries into one big static libllvm.
* Similar for all separate clang and lldb static libraries.
* For all these libraries, generate their .inc files only once.
* Link all llvm tools (including extra) against the big libllvm.
* Link clang and clang-format against the big libllvm and libclang.
* Link lldb against the big libllvm, libclang and liblldb.

N.B.: This is work in progress, some details may still be missing.

It also heavily depends on bsd.*.mk's support for SRCS and DPSRCS with
relative pathnames, which apparently does not always work as expected.
For building llvm, clang and lldb though, it seems to work just fine.

The main idea behind this restructuring is maintainability and build
peformance. The previous large number of very small libraries, each
with their own generated files and dependencies was slow to traverse
and hard to understand.

Possible future improvements:
* Only build certain targets, e.g. for most regular users having just
one target will be fine. This will shave off some build time.
* Building the big llvm, clang and lldb libraries as shared (private)
libraries.
* Adding other components from the LLVM project, such as lld.

# 9a282b3e 07-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Re-add generated arm_neon.h header, which was accidentally dropped while
refactoring lib/clang/headers/Makefile in r363984.


# 48aaf27b 06-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Update Makefiles under lib/clang and usr.bin/clang for 11.0.0 builds,
and also bump the version in the mtree files.


# 9771cac2 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Update build glue for a minimal build of the clang executable.


# 0b37c159 25-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

* Bump version numbers to 10.0.0
* Update UPDATING
* Update (Optional)ObsoleteFiles.inc
* Update VCS(Revision|Version) files
* Update generated config headers
* Update clang internal headers Makefile


# 2f3724e6 31-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Update Makefile and mtree for clang internal headers, and update
OptionalObsoleteFiles.inc for added and removed files.


# 72e1e271 23-Aug-2019 Dimitry Andric <dim@FreeBSD.org>

Change clang lib dir to 9.0.0.


# 0bf31f1f 20-Jan-2019 Dimitry Andric <dim@FreeBSD.org>

Update version numbers, and regenerate config headers for llvm, clang,
lld and lldb. Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc.


# 611d080e 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update clang intrinsics headers.


# 6dfa117f 31-Jul-2018 Dimitry Andric <dim@FreeBSD.org>

Update llvm/clang version numbers in various files.


# 55458465 30-Jun-2018 Dimitry Andric <dim@FreeBSD.org>

More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to
update mtree files, ObsoleteFiles and a number of other paths. Sorry
about all the breakage.

Pointy hat to: me
MFC after: 2 weeks
X-MFC-With: r335799


# cd8e0f1f 20-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Add new clang intrinsics headers, and update version number.


# 68e19318 09-May-2017 Dimitry Andric <dim@FreeBSD.org>

Add new LWP intrinsics header, and an option to install internal clang
headers which have the same name as our system headers, and might
conflict with them. (It is a work in progress to make these fully
compatible.)


# f849be8a 16-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Add preliminary UPDATING and ObsoleteFiles.inc entries. Also add one
new intrinsics header.


# 5897d2f0 17-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Initial update of clang/llvm build glue, for building just a minimal
clang executable.


# 53fe1d28 05-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Adjust version numbers for the clang library directory.


# 09bfd043 03-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Initial updates to llvm/clang build glue.


# 5042637b 02-Dec-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for clang 3.9.1 r288513.


# 5b41a5b6 25-Nov-2016 Dimitry Andric <dim@FreeBSD.org>

Update build glue for llvm/clang 3.9.1.


# 986e05bc 26-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Completely revamp the way llvm, clang and lldb are built.

* Bootstrap llvm-tblgen and clang-tblgen with a minimal llvm static
library, that has no other dependencies.
* Roll up all separate llvm libraries into one big static libllvm.
* Similar for all separate clang and lldb static libraries.
* For all these libraries, generate their .inc files only once.
* Link all llvm tools (including extra) against the big libllvm.
* Link clang and clang-format against the big libllvm and libclang.
* Link lldb against the big libllvm, libclang and liblldb.

N.B.: This is work in progress, some details may still be missing.

It also heavily depends on bsd.*.mk's support for SRCS and DPSRCS with
relative pathnames, which apparently does not always work as expected.
For building llvm, clang and lldb though, it seems to work just fine.

The main idea behind this restructuring is maintainability and build
peformance. The previous large number of very small libraries, each
with their own generated files and dependencies was slow to traverse
and hard to understand.

Possible future improvements:
* Only build certain targets, e.g. for most regular users having just
one target will be fine. This will shave off some build time.
* Building the big llvm, clang and lldb libraries as shared (private)
libraries.
* Adding other components from the LLVM project, such as lld.