History log of /freebsd-current/lib/libclang_rt/Makefile
Revision Date Author Comments
# 897a485c 21-Mar-2024 Dimitry Andric <dim@FreeBSD.org>

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: e77a1bb27574
MFC after: 3 days


# f0620cee 21-Mar-2024 Dimitry Andric <dim@FreeBSD.org>

Fix building of several libclang_rt libraries for powerpc64 and powerp64le

I reorganized the libclang_rt Makefile in e77a1bb27574 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: e77a1bb27574
MFC after: 3 days


# e77a1bb2 28-Dec-2023 Dimitry Andric <dim@FreeBSD.org>

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


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

Remove $FreeBSD$: one-line sh pattern

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


# f5024381 17-May-2022 Piotr Kubaj <pkubaj@FreeBSD.org>

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


# c1e0431c 18-Apr-2022 Piotr Kubaj <pkubaj@FreeBSD.org>

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


# 9fc13142 13-Jan-2022 Piotr Kubaj <pkubaj@FreeBSD.org>

riscv64: enable ASAN and UBSAN

Differential review: https://reviews.freebsd.org/D33875
Approved by: dim, imp


# cf084e9e 12-Oct-2020 Alex Richardson <arichardson@FreeBSD.org>

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


# 4789686d 13-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Rearrange libclang_rt Makefile again, and attempt to simplify it.

It turns out that parts of the common sanitizer code still do not
compile for arm and aarch64, at least not on FreeBSD, so for now those
are all limited to amd64, and sometimes i386.


# cde67b40 05-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Add some missed continuation backslashes.


# f57be329 01-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Update libclang_rt:
* Add cfi, dd, fuzzer and xray
* Update arch support
* Update OptionalObsoleteFiles.inc


# 613d2812 22-Apr-2019 Enji Cooper <ngie@FreeBSD.org>

Build libclang_rt/profile on all clang-supported architectures

There's no reason why a special case needs to be added specifically for amd64,
arm, and i386, as the code is written in machine architecture agnostic C/C++.

This will make it possible for all supporting clang architectures to produce
runtime coverage with `--coverage`.

MFC after: 2 weeks
Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D20003


# c6994e5b 04-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

For now, msan is 64-bit only.


# a757dfac 03-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

Update lib/libclang_rt for compiler-rt trunk r338150.


# 71cb2dfc 17-Jul-2018 Warner Losh <imp@FreeBSD.org>

Remove special cases for armeb in the build.

Differential Revision: https://reviews.freebsd.org/D16257


# bba3cdaf 25-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Only build tsan and tsan_cxx for amd64, as 32 bit is unsupported.


# fb142d88 23-Dec-2017 Dimitry Andric <dim@FreeBSD.org>

Next step in updating llvm/clang build glue: make libclang_rt build.


# 5252514f 06-Nov-2017 Enji Cooper <ngie@FreeBSD.org>

Remove unnecessary src.opts.mk .include

MK_<FOO> isn't used in lib/libcompiler_rt/Makefile at all. Remove it to reduce
namespace pollution.

MFC after: 1 week


# 85ab8f98 29-Nov-2015 Dimitry Andric <dim@FreeBSD.org>

Install the public sanitizer headers. These are useful for programs
that want to directly interface with sanitizer internals.


# 8028b78d 13-Jan-2015 Dimitry Andric <dim@FreeBSD.org>

Connect libclang_rt to the build, for specific architectures. This
contains the libraries for Address Sanitizer (asan), Undefined Behavior
Sanitizer (ubsan) and Profile Guided Optimization.

ASan is a fast memory error detector. It can detect the following types
of bugs:

Out-of-bounds accesses to heap, stack and globals
Use-after-free
Use-after-return (to some extent)
Double-free, invalid free
Memory leaks (experimental)

Typical slowdown introduced by AddressSanitizer is 2x.

UBSan is a fast and compatible undefined behavior checker. It enables a
number of undefined behavior checks that have small runtime cost and no
impact on address space layout or ABI.

PLEASE NOTE: the sanitizers still have some rough edges on FreeBSD,
particularly on i386. These will hopefully be smoothed out in the
coming time.

Differential Revision: https://reviews.freebsd.org/D1505


# 91d03e2e 08-Jan-2015 Dimitry Andric <dim@FreeBSD.org>

Now compiler-rt has been updated in r276851, bring in the various
sanitizer libraries that already work on FreeBSD:

* asan: Address Sanitizer
* ubsan: Undefined Behavior Sanitizer
* profile: Profile Guided Optimization support

Please note that these libraries are *experimental* at this stage, so
the main Makefile is not yet connected to the build.

Since I didn't want to needlessly edit BSD.usr.dist, you will also have
to create the install directory /usr/lib/clang/3.5.0/lib/freebsd
manually for now.