mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Apply ASAN/UBSAN Makefile check only for build target
COMPILER_TYPE is not set during cleandir and perhaps other non-build targets, and a build with ASAN or UBSAN enabled failed with an error reporting that runtime libraries could not be built. PR: 260099 Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32805
This commit is contained in:
parent
ecd8245e0d
commit
2a31cd215d
@ -185,7 +185,7 @@ SUBDIR.${MK_STATS}+= libstats
|
|||||||
${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" || \
|
${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" || \
|
||||||
${MACHINE_CPUARCH} == "powerpc")
|
${MACHINE_CPUARCH} == "powerpc")
|
||||||
_libclang_rt= libclang_rt
|
_libclang_rt= libclang_rt
|
||||||
.elif ${MK_ASAN} != "no" || ${MK_UBSAN} != "no"
|
.elif (${MK_ASAN} != "no" || ${MK_UBSAN} != "no") && make(all)
|
||||||
.error "Requested build with sanitizers but cannot build runtime libraries!"
|
.error "Requested build with sanitizers but cannot build runtime libraries!"
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ _use_sanitizers= yes
|
|||||||
.endif # ${MK_UBSAN} == "yes"
|
.endif # ${MK_UBSAN} == "yes"
|
||||||
|
|
||||||
.if !defined(BOOTSTRAPPING) && ${_use_sanitizers} != "no" && \
|
.if !defined(BOOTSTRAPPING) && ${_use_sanitizers} != "no" && \
|
||||||
${COMPILER_TYPE} != "clang"
|
${COMPILER_TYPE} != "clang" && make(all)
|
||||||
.error "Sanitizer instrumentation currently only supported with clang"
|
.error "Sanitizer instrumentation currently only supported with clang"
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user