Commit graph

59 commits

Author SHA1 Message Date
Dimitry Andric 7a6dacaca1 Merge llvm-project main llvmorg-18-init-18359-g93248729cfae
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
last commit before the upstream release/18.x branch was created.

PR:		276104
MFC after:	1 month
2024-04-06 22:13:49 +02:00
Dimitry Andric cb14a3fe51 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
2024-04-06 22:13:06 +02:00
Dimitry Andric 5f757f3ff9 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
2024-04-06 22:11:55 +02:00
Dimitry Andric 73ff7384e0 Optionally create full debuginfo for llvm-related executables
Commit de6feefdb7 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
2024-02-17 00:15:32 +01:00
Dimitry Andric 06c3fb2749 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
2023-12-08 18:34:50 +01:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Dimitry Andric bdd1243df5 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
2023-06-22 20:20:56 +02:00
Dimitry Andric 4dc3b1fa1b Revert "Ensure .inc files are regenerated when llvm/clang tblgen binaries change"
This reverts commit ab80f0b21f. 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:		ab80f0b21f
2023-03-29 20:37:02 +02:00
Dimitry Andric d8ed7fa3d5 Revert "Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed"
This reverts commit 8f391d9098. There are
still a bunch of problems, and apparently ${.ALLSRC} does not work as I
expected.

Fixes:          8f391d9098
2023-03-29 20:31:33 +02:00
Dimitry Andric 8f391d9098 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
2023-03-29 19:49:49 +02:00
Dimitry Andric ab80f0b21f 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 (3264f6b88f), 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
2023-02-26 15:56:07 +01:00
Dimitry Andric 972a253a57 Merge llvm-project main llvmorg-15-init-17826-g1f8ae9d7e7e4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-17826-g1f8ae9d7e7e4, the last commit before
the upstream release/16.x branch was created.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:04:48 +01:00
Dimitry Andric 753f127f3a 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
2023-02-08 20:03:59 +01:00
Dimitry Andric 81ad626541 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
2023-02-08 20:02:26 +01:00
Dimitry Andric 1838bd0f48 Merge llvm-project release/14.x llvmorg-14-init-18315-g190be5457c90
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-18315-g190be5457c90.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:45:25 +02:00
Dimitry Andric 04eeddc0aa 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
2022-05-14 13:44:34 +02:00
Dimitry Andric 4824e7fd18 Merge llvm-project main llvmorg-14-init-11187-g222442ec2d71
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-11187-g222442ec2d71.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:43:49 +02:00
Dimitry Andric 5e801ac66d 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
2022-05-14 13:43:32 +02:00
Dimitry Andric fe6060f10f 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
2021-11-13 21:39:49 +01:00
Dimitry Andric e8d8bef961 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
2021-06-13 21:37:19 +02:00
Dimitry Andric 20885331a9 Put clang/lib/Tooling/Core/Replacement.cpp under SRCS_MIN, since it is
required by both the static analyzer (MK_CLANG_FULL) and clang-format
(MK_CLANG_FORMAT). We could also invent yet another SRCS variant, but
that seems a bit overkill.
2020-08-06 20:55:18 +00:00
Dimitry Andric 48aaf27bca Update Makefiles under lib/clang and usr.bin/clang for 11.0.0 builds,
and also bump the version in the mtree files.
2020-08-06 19:30:00 +00:00
Conrad Meyer 0a9ab9f549 Add WITH_CLANG_FORMAT option
clang-format is enabled conditional on either WITH_CLANG_EXTRAS or
WITH_CLANG_FORMAT.  Some sources in libclang are build conditional on
either rule, and obviously the clang-format binary itself depends on the
rule.

clang-format could still use a manual page.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D25427
2020-06-24 17:03:42 +00:00
Dimitry Andric c357f7d2a2 Update build glue for a full build (MK_CLANG_FULL=yes) of the clang
executable.
2020-01-26 17:22:05 +00:00
Dimitry Andric 9771cac291 Update build glue for a minimal build of the clang executable. 2020-01-26 00:21:30 +00:00
Dimitry Andric 0b57cec536 Move all sources from the llvm project into contrib/llvm-project.
This uses the new layout of the upstream repository, which was recently
migrated to GitHub, and converted into a "monorepo".  That is, most of
the earlier separate sub-projects with their own branches and tags were
consolidated into one top-level directory, and are now branched and
tagged together.

Updating the vendor area to match this layout is next.
2019-12-20 19:53:05 +00:00
Dimitry Andric a1aaa66be8 Add explanatory comments for the different SRCS_xxx variables used in
the Makefiles for libllvm and libclang.  While here, cleanup a commented
out SRCS entry in libllvmminimal's Makefile.

MFC after:	3 days
2019-11-20 18:12:01 +00:00
Dimitry Andric 23559b6ac2 Update build glue for a build of clang including the static analyzer
(enabled via MK_CLANG_FULL).
2019-08-24 21:04:29 +00:00
Dimitry Andric 4014a71fd2 Update build glue for a minimal build of the clang executable. 2019-08-23 22:17:36 +00:00
Dimitry Andric efa7559714 Update llvm and clang build glue to make MK_CLANG_EXTRAS=yes and
MK_CLANG_FULL=yes work.
2019-01-21 19:39:35 +00:00
Dimitry Andric 5e86819c72 Add and remove sources from libllvm and libclang, to make the minimal
clang executable (with all options except targets off) build.
2019-01-21 06:52:55 +00:00
Dimitry Andric 99be4f2a04 Update build glue for upstream r338536 import. 2018-08-02 19:32:32 +00:00
Dimitry Andric 67b158f6ad Update build blue to make WITH_CLANG_EXTRAS and WITH_CLANG_FULL work. 2018-08-01 20:46:06 +00:00
Dimitry Andric 9f6e9a9f35 Make the minimal clang executable build. 2018-07-31 21:07:20 +00:00
Dimitry Andric d1efe5165c Remove SRCS for files that have been deleted upstream. 2018-07-31 18:32:57 +00:00
Dimitry Andric 77b0be52d7 Next step in updating llvm/clang build glue: make lldb build. 2017-12-22 19:10:19 +00:00
Dimitry Andric 44389c28aa Sort source file lists under lib/clang. 2017-12-22 13:35:26 +00:00
Dimitry Andric ea68f99b08 Next step in updating llvm/clang build glue: make the full clang
executable build.
2017-12-22 10:04:40 +00:00
Dimitry Andric 36cb3905c9 First step in updating llvm/clang build glue: make only the clang
executable build.
2017-12-21 21:24:52 +00:00
Bryan Drewery ddf95e2ae8 Tell bsd.dep.mk which depend files to dinclude.
This allows the _SKIP_DEPEND optimization to work, avoiding reading
the files when not needed.  It also fixes META_MODE incorrectly
reading these files when not needed.

Sponsored by:	Dell EMC Isilon
2017-11-10 20:09:15 +00:00
Dimitry Andric edd7eaddc8 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306325, and update
build glue.
2017-06-27 06:40:39 +00:00
Dimitry Andric 4198293b25 Merge ^/head r319801 through r320041. 2017-06-17 00:14:54 +00:00
Dimitry Andric 5c4e2ac498 Revert r319796 for now, it can cause undefined references when linking
in some circumstances.

Reported by:	Shawn Webb <shawn.webb@hardenedbsd.org>
2017-06-13 21:01:06 +00:00
Dimitry Andric 834210fa5d Remove a few unneeded files from libllvm, libclang and liblldb.
MFC after:	3 days
2017-06-10 18:52:13 +00:00
Dimitry Andric 89cb50c933 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304222, and update
build glue.
2017-05-30 19:24:09 +00:00
Dimitry Andric 302affcb04 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and update
build glue.
2017-05-29 22:09:23 +00:00
Dimitry Andric f37b6182a5 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302069, and update
build glue (preliminary, not all option combinations work yet).
2017-05-03 21:54:55 +00:00
Dimitry Andric b33474c89f Strip out a few objects from libclang, liblldb and lldb, which are not
referenced due to the selection of tools that we build, and our compile
time options.
2017-04-21 21:06:11 +00:00
Dimitry Andric 482a8244bf Update some more build glue. All llvm extras, lld and lldb should link now. 2017-04-21 15:59:58 +00:00
Dimitry Andric 050e2df194 Add new objects to lib/clang/lib{llvm,clang} and usr.bin/clang for the
MK_CLANG_EXTRAS=yes case.
2017-04-18 17:39:20 +00:00