Skip to content

Commit

Permalink
Use .sinclude for bsd.sanitizer.mk
Browse files Browse the repository at this point in the history
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:		7bc797e ("Add build system support for ASAN+UBSAN instrumentation")
  • Loading branch information
arichardson committed Aug 3, 2021
1 parent 04cc0c3 commit 428a32e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion share/mk/bsd.lib.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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*)
Expand Down
3 changes: 2 additions & 1 deletion share/mk/bsd.prog.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 428a32e

Please sign in to comment.