Use .sinclude for bsd.sanitizer.mk

We don't install this file since MK_ASAN/MK_UBSAN is only supported for
src builds. However, some ports also use bsd.lib.mk/bsd.prog.mk so we
should not fail the build if it can't be included.

Reported by:	jkim
Fixes:		7bc797e3f3 ("Add build system support for ASAN+UBSAN instrumentation")
This commit is contained in:
Alex Richardson 2021-08-03 10:37:28 +01:00
parent 04cc0c393c
commit 428a32edba
2 changed files with 4 additions and 2 deletions

View file

@ -108,7 +108,8 @@ CXXFLAGS+= -ftrivial-auto-var-init=pattern
.endif
.endif
.include "bsd.sanitizer.mk"
# bsd.sanitizer.mk is not installed, so don't require it (e.g. for ports).
.sinclude "bsd.sanitizer.mk"
.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \
empty(DEBUG_FLAGS:M-gdwarf*)

View file

@ -81,7 +81,8 @@ CXXFLAGS+= -ftrivial-auto-var-init=pattern
.endif
.endif
.include "bsd.sanitizer.mk"
# bsd.sanitizer.mk is not installed, so don't require it (e.g. for ports).
.sinclude "bsd.sanitizer.mk"
.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == ""
CFLAGS += -mno-relax