0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Allow sanitization compiler option

This commit is contained in:
Igor Putovny 2023-10-24 13:46:28 +02:00
parent 5bde9a161a
commit 6923545597

View File

@ -36,6 +36,12 @@ AC_ARG_ENABLE([memcheck],
[enable_memcheck=yes]
)
AC_ARG_ENABLE([satan],
[AS_HELP_STRING([--enable-satan], [enable memory and undefined bahaviour sanitization @<:@no@:>@])],
[],
[enable_satan=no]
)
AC_ARG_ENABLE([compact-tries],
[AS_HELP_STRING([--enable-compact-tries], [use 4-way tries instead of 16-way ones @<:@no@:>@])],
[],
@ -425,6 +431,12 @@ if test "$enable_debug" = yes ; then
fi
fi
if test "$enable_satan" = yes; then
BIRD_CHECK_GCC_OPTION([bird_cv_c_option_satan_address], [-fsanitize=address], [])
BIRD_CHECK_GCC_OPTION([bird_cv_c_option_satan_undefined], [-fsanitize=undefined], [])
BIRD_CHECK_GCC_OPTION([bird_cv_c_option_satan_memory], [-fsanitize=memory], [])
fi
if test "$enable_compact_tries" = yes ; then
AC_DEFINE([ENABLE_COMPACT_TRIES], [1], [Define to 1 if you want 4-way tries instead of 16-way ones.])
fi