Commit Graph

125 Commits

Author SHA1 Message Date
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
897a485c34 Slightly reorganize libclang_rt Makefile again
Make a separate .elif section for MACHINE_ARCH==powerpc, and subdivide
the MACHINE_CPUARCH values under it. If at some point more sanitizer
libraries become available for powerpc CPU architectures, they can be
added before the "nothing for other powerpc yet" case. Similar for the
MACHINE_ARCH==arm case.

PR:		262706
Fixes:		e77a1bb275
MFC after:	3 days
2024-03-21 21:44:46 +01:00
Dimitry Andric
f0620ceecc Fix building of several libclang_rt libraries for powerpc64 and powerp64le
I reorganized the libclang_rt Makefile in e77a1bb275 to make it more
readable and maintainable, but the check for 32-bit powerpc was wrong.
This caused almost no libclang_rt libraries to be built for powerpc64
and powerpc64le.

PR:		262706
Reported by:	tuexen
Fixes:		e77a1bb275
MFC after:	3 days
2024-03-21 18:05:25 +01:00
Dimitry Andric
e77a1bb275 Reorganize libclang_rt Makefile and make more lib/arch combos available
Upstream has made more clang runtime libraries available for more
architectures, so add them. To make this easier, split up subdir lists
into functional parts (asan, tsan, etc), and put each architecture into
its own .if block.

Effectively, this adds the following libraries for aarch64: asan, cfi,
fuzzer, msan, safestack, stats, tsan, ubsan, xray.

PR:		262706
MFC after:	3 days
2023-12-28 13:57:41 +01:00
Dimitry Andric
0c3af23961 Add missing sources to libclang_rt Makefiles, clean up unneeded ones
During the llvm-17 merge, a few new source files were not added to the
libclang_rt Makefiles, in particular sanitizer_thread_arg_retval.cpp
which is now required for AddressSanitizer and MemorySanitizer. Also,
MemorySanitizer now requires msan_dl.cpp.

While here, clean out a number of source files that compile into nothing
(because they only contain non-FreeBSD parts). Also, remove a duplicated
instance of tsan_new_delete.cpp from libclang_rt.tsan, since it is only
supposed to live in libclang_rt.tsan_cxx.

PR:		275854
Reported by:	jbeich
MFC after:	1 month
2023-12-20 17:08:26 +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
Ka Ho Ng
ebb1e0f193 libclang_rt: Update Makefile.depend
MFC after:	3 days
2023-12-02 04:18:54 -05:00
Ka Ho Ng
d030761168 dirdeps: Update/fix Makefile.depend* for toolchain
This fixes make pseudo/toolchain.
2023-11-26 20:50:13 -05:00
Doug Rabson
78847e1e59 pkgbase: Move headers and libs out of runtime and utilities
Headers from src/include were in the runtime-dev package but
subdirectories of src/include ended up in utilities-dev by default.
Neither package is a good choice - the headers in src/include are not
useful without the libraries contained in clibs-dev.

This moves the standard C headers to clibs-dev (C++ headers are already
in this package). While working on this, I found that various clang
libraries and headers were also bundled into utilities-dev by default
so these are also moved to clang-dev.

I also added a FreeBSD-build-essential meta package to make it simple to
install all the toolchain parts.

PR:		254173
Reviewed byb:	manu
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D41815
2023-09-12 13:22:21 +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
John Baldwin
10172ce32c Stop stripping 'sf' suffixes from architecture names.
riscv64sf was the only architecture with an 'sf' suffix.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D39497
2023-04-12 11:11:02 -07:00
Dimitry Andric
50d7464c3f 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
2023-02-08 20:05:25 +01:00
Dimitry Andric
f3fd488f1e 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
2023-02-08 20:05:19 +01:00
Dimitry Andric
6246ae0b85 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
2023-02-08 20:05:09 +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
John Baldwin
21d2d29f59 libclang_rt: Trim a few more MIPSisms.
The only FreeBSD architectures ending in 'hf' were MIPS hard-float
architectures.

Reviewed by:	emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D35591
2022-06-30 10:02:37 -07:00
Dimitry Andric
56f451bb3b 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
2022-06-12 20:53:16 +02:00
Dimitry Andric
809922b010 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:		ab9d54731f
MFC after:	3 days
2022-06-05 18:39:43 +02:00
Dimitry Andric
7b6f5ebef6 Add several sanitizer ignore lists under /usr/lib/clang
Some of the sanitizers from compiler-rt can use ignore lists, which are
loosely modeled on valgrind's example. Upstream provides default lists
for AddressSanitizer, CFI, and MemorySanitizer, so install these in the
expected location, /usr/lib/clang/14.0.3/share.

Reviewed by:	emaste
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D35338
2022-05-28 15:46:38 +02:00
Piotr Kubaj
f5024381ac powerpc: enable supported sanitizers on powerpc64*
1. Merge LLVM's 315d792130258a9b7250494be8d002ebb427b08f, adding support
for FreeBSD/powerpc64*.
2. Add sanitizer list to lib/libclang_rt/Makefile, taken from the list of
libraries that llvm-devel port builds.
3. powerpc64le supports the same sanitizers that powerpc64, but powerpc64le
also supports xray* sanitizers.
4. lib/libclang_rt/xray/Makefile hardcodes amd64-specific files, so that needs
to be conditionalized.
5. Sanitizers are not enabled for powerpc, because powerpc supports only
builtins and profile.

Reviewed by:	dim
Differential Revision: https://reviews.freebsd.org/D35228
Relnotes:	yes
MFC after:	3 days
2022-05-17 21:46:53 +02:00
Piotr Kubaj
c1e0431c22 riscv: also enable includes, stats and stats_client in libclang_rt
Reviewed by:	dim (earlier version)
Differential Revision: https://reviews.freebsd.org/D34735
MFC after:	3 days
2022-05-16 23:56:21 +02:00
Dimitry Andric
3a9a9c0ca4 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
2022-05-14 13:46:42 +02:00
Dimitry Andric
d781ede639 Merge llvm-project release/14.x llvmorg-14.0.0-rc2-12-g09546e1b5103
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc2-12-g09546e1b5103.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:46:11 +02:00
Dimitry Andric
d56accc7c3 Merge llvm-project release/14.x llvmorg-14.0.0-rc1-74-g4dc3cb8e3255
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc1-74-g4dc3cb8e3255.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:45:57 +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
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
Piotr Kubaj
18f71c9b27 riscv: fix riscv64sf build
The library needs to have sf suffix cut off.

MFC after:	3 days
X-MFC with:	3781e77995
Differential revision:	https://reviews.freebsd.org/D34561
Reviewed by:	dim
2022-03-24 15:25:41 +01:00
Piotr Kubaj
9fc1314266 riscv64: enable ASAN and UBSAN
Differential review:	https://reviews.freebsd.org/D33875
Approved by:	dim, imp
2022-01-14 01:29:58 +01:00
Dimitry Andric
6e75b2fbf9 Merge llvm-project release/13.x llvmorg-13.0.0-rc1-97-g23ba3732246a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc1-97-g23ba3732246a.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:42:03 +01: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
Mitchell Horne
61ed578ee6 Prefer MK_SSP=no to SSP_CFLAGS=
It is more idiomatic. CFLAGS is only augmented with $SSP_CFLAGS when
$MK_SSP != "no".

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31401
2021-08-04 15:23:22 -03:00
Alex Richardson
17d6371e4c Fix GCC and -DWITH_CLEAN build after 7bc797e3f3
Reported by:	kib
2021-08-02 16:03:05 +01:00
Alex Richardson
7bc797e3f3 Add build system support for ASAN+UBSAN instrumentation
This adds two new options WITH_ASAN/WITH_UBSAN that can be set to
enable instrumentation of all binaries with AddressSanitizer and/or
UndefinedBehaviourSanitizer. This current patch is almost sufficient
to get a complete buildworld with sanitizer instrumentation but in
order to actually build and boot a system it depends on a few more
follow-up commits.

Reviewed By:	brooks, kib, markj
Differential Revision: https://reviews.freebsd.org/D31043
2021-08-02 14:33:24 +01:00
Dimitry Andric
23408297fb 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
2021-06-19 20:09:28 +02: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
Alex Richardson
fe525d3f91 Allow using sanitizers for ssp tests with out-of-tree compiler
With an out-of-tree Clang, we can use the -resource-dir flag when linking
to point it at the runtime libraries from the current SYSROOT.
This moves the path to the clang-internal library directory to a separate
.mk file that can be used by Makefiles that want to find the sanitizer
libraries. I intend to re-use this .mk file for my upcoming changes that
allow building the entire base system with ASAN/UBSAN/MSAN.

Reviewed By:	dim
Differential Revision: https://reviews.freebsd.org/D28852
2021-03-12 17:15:33 +00:00
Dimitry Andric
772c631af8 Add a few missed files to libclang_rt.profile-<arch>.a
Otherwise, programs compiled with -fprofile-instr-generate will
encounter undefined symbol errors during linking, for example
__llvm_profile_counter_bias, lprofSetRuntimeCounterRelocation and a few
others were missing from the profile library.

Reported by:	ota@j.email.ne.jp
PR:		254001
MFC after:	3 days
2021-03-05 21:07:07 +01:00
Dimitry Andric
eaeb601bd6 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
2021-01-03 13:54:24 +01:00
Alex Richardson
cf084e9e92 Enable SUBDIR_PARELLEL in lib/libclang_rt
I noticed that this part of the build was taking much longer than
expected. Turns out it's due to not running the subdirs in parallel.
Reduces `make all` inside lib/libclang_rt time from 63s to 20s with -j32.

Reviewed By:	dim
Differential Revision: https://reviews.freebsd.org/D26623
2020-10-12 10:42:33 +00:00
Dimitry Andric
8460d7540b Merge ^/head r364051 through r364081. 2020-08-10 16:58:05 +00:00
Dimitry Andric
a08d04f4e4 Follow-up to r358851 (llvm-project 10.0.0-rc3 import), where I added
subdirectories for compiler-rt's internal fuzzer, profile and xray
headers, but forgot to add installing those headers themselves.

MFC after:	3 days
2020-08-10 16:55:54 +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
Dimitry Andric
d65cd7a57b 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
2020-05-23 10:32:18 +00:00
Eric van Gyzen
fac6dee9eb Remove tests for obsolete compilers in the build system
Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree.
Assume clang is at least 6, which was in 11.2-RELEASE.  Drop conditions
for older compilers.

Reviewed by:	imp (earlier version), emaste, jhb
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D24802
2020-05-12 15:22:40 +00:00
Dimitry Andric
0af133f6f1 Update build glue for libclang_rt. 2020-01-27 20:46:26 +00:00
Dimitry Andric
0b37c15904 * 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
2020-01-25 16:23:49 +00:00
Dimitry Andric
c14a5a8800 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
2019-12-22 11:50:44 +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
1bb8eb56ef libclang_rt: enable on powerpc*
Summary:
Enable on powerpc64 and in lib/libclang_rt/Makefile change
MACHINE_CPUARCH to MACHINE_ARCH because on powerpc64
MACHINE_ARCH==MACHINE_CPUARCH so the 32-bit library overwrites 64-bit
library during installworld.

This patch doesn't enable any other libclang_rt libraries because they
need to be separately ported.

I have verified that games/julius (which fails on powerpc64 elfv2
without this change because of no libclang_rt profiling library) builds.

Test Plan: Ship it, test on powerpc and powerpcspe

Submitted by:	pkubaj
Reviewed by:	dim, jhibbits
Differential Revision: https://reviews.freebsd.org/D22425
MFC after:	1 month
X-MFC-With:	r353358
2019-11-23 19:35:09 +00:00