1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

ports-mgmt/pkg-devel: Add an option for building with sanitizer

Sanitizers helps finding problems, add an option to pkg-devel to be
able to compile with them.
This commit is contained in:
Emmanuel Vadot 2021-09-14 12:08:58 +02:00
parent 8b546c40d0
commit 4f3befc2a3

View File

@ -25,7 +25,8 @@ CONFIGURE_ENV= CC_FOR_BUILD="${CC}"
# so that pkg-static is used from the wrkdir
USE_SUBMAKE= yes
OPTIONS_DEFINE= DOCS
OPTIONS_DEFINE= DOCS SAN
SAN_DESC= Enable sanitizers (ASAN and UBSAN)
.if !exists(/usr/include/jail.h)
EXTRA_PATCHES= ${FILESDIR}/extra-patch-docs_pkg.8
@ -33,6 +34,10 @@ EXTRA_PATCHES= ${FILESDIR}/extra-patch-docs_pkg.8
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MSAN}
CONFIGURE_ARGS+= --with-asan --with-ubsan
.endif
# TODO: activate in april 2021
#.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1400000
#CONFIGURE_ARGS+= --default-format=tzst