git: 4f3befc2a362 - main - ports-mgmt/pkg-devel: Add an option for building with sanitizer

Jan Beich jbeich at FreeBSD.org
Tue Sep 14 11:51:23 UTC 2021


Emmanuel Vadot <manu at FreeBSD.org> writes:

> -OPTIONS_DEFINE=	DOCS
> +OPTIONS_DEFINE=	DOCS SAN
> +SAN_DESC=	Enable sanitizers (ASAN and UBSAN)

FWIW, other ports use different option name:

net-p2p/c-lightning/Makefile
38:ASAN_CONFIGURE_ENABLE=		address-sanitizer
39:ASAN_DESC=                   Compile with address-sanitizer

security/snort3/Makefile
35:ADDRESSSANITIZER_DESC=	Enable address sanitizer
44:ADDRESSSANITIZER_CMAKE_BOOL=	ENABLE_ADDRESS_SANITIZER
41:THREADSANITIZER_DESC=	Enable thread sanitizer
54:THREADSANITIZER_CMAKE_BOOL=	ENABLE_THREAD_SANITIZER

>  
> +.if ${PORT_OPTIONS:MSAN}
> +CONFIGURE_ARGS+=	--with-asan --with-ubsan
> +.endif

With option helpers it can be more declarative e.g.,

SAN_CONFIGURE_WITH=	asan ubsan


More information about the dev-commits-ports-main mailing list