git: ad09e2c8cfbc - main - Don't build sanitizer runtimes under WITHOUT_CXX
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Oct 2021 14:06:02 UTC
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ad09e2c8cfbc2cf6f2b8826c121d6de8b3bfe96d commit ad09e2c8cfbc2cf6f2b8826c121d6de8b3bfe96d Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2021-10-29 00:49:12 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2021-10-29 14:05:49 +0000 Don't build sanitizer runtimes under WITHOUT_CXX In the past we built the sanitizer runtimes when building Clang (and using Clang as the compiler) but 7676b388adbc changed this to be conditional only on using Clang, to make the runtimes available for external Clang. They fail to build when WITHOUT_CXX is set though, so add MK_CXX as part of the condition. Reported by: Michael Dexter, Build Option Survey Reviewed by: imp, jrtc27 Fixes: 7676b388adbc ("Always build the sanitizer runtimes...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32731 --- lib/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 3f30917173af..93761cc06b21 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -176,10 +176,9 @@ SUBDIR.${MK_KERBEROS_SUPPORT}+= libcom_err SUBDIR.${MK_LDNS}+= libldns 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 ${COMPILER_TYPE} == "clang" && \ +# The libraries under libclang_rt can only be built by clang and when we enable +# C++ support. Furthermore, they can only be built for certain architectures. +.if ${COMPILER_TYPE} == "clang" && ${MK_CXX} != "no" && \ (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" || \ ${MACHINE_CPUARCH} == "powerpc")