diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -298,6 +298,17 @@ ${X_}COMPILER_FEATURES+= aarch64-sha512 .endif +.if (${${X_}COMPILER_TYPE} == "clang" && ${MACHINE_ARCH:Marm} == "" && \ + ${MACHINE_ARCH:Mpowerpc} == "") +${X_}COMPILER_FEATURES+= asan +.endif + +.if (${${X_}COMPILER_TYPE} == "clang" && ${MACHINE_ARCH:Marm} == "" && \ + ${MACHINE_ARCH:Mi386} == "" && ${MACHINE_ARCH:Mpowerpc} == "" && \ + ${MACHINE_ARCH:Mriscv} == "") +${X_}COMPILER_FEATURES+= msan +.endif + .else # Use CC's values X_COMPILER_TYPE= ${COMPILER_TYPE}