aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2021-02-10 15:25:14 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2021-04-10 13:01:04 +0000
commit2cb6b07ca506d2c1876279d477022022194e4cc9 (patch)
tree6d981ef3fecb146e01df114cbccb47c695f64762
parent4eaec3eb5f9e67eb20be00c20ff28537c3a51285 (diff)
downloadsrc-2cb6b07ca506d2c1876279d477022022194e4cc9.tar.gz
src-2cb6b07ca506d2c1876279d477022022194e4cc9.zip
Always build the sanitizer runtimes when compiling with clang
This allows instrumenting e.g. test binaries even when compiling with an external clang (e.g. CROSS_TOOLCHAIN=llvm11). I have some upcoming patches that allow building the entire base system with ASan/UBSan/etc. instrumentation and this is required in preparation for this. Reviewed By: dim, emaste Differential Revision: https://reviews.freebsd.org/D28532 (cherry picked from commit 7676b388adbc81a2ad46b43852cd9bc7ac7fad7e)
-rw-r--r--lib/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Makefile b/lib/Makefile
index ddb627917215..90f1f7f3cd73 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -175,7 +175,7 @@ SUBDIR.${MK_STATS}+= libstats
# The libraries under libclang_rt can only be built by clang, and only make
# sense to build when clang is enabled at all. Furthermore, they can only be
# built for certain architectures.
-.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
+.if ${COMPILER_TYPE} == "clang" && \
(${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" || \
${MACHINE_CPUARCH} == "powerpc")