diff options
author | Thomas Haller <thaller@redhat.com> | 2020-05-13 17:39:54 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-05-14 12:19:34 +0200 |
commit | 1acb351848e3718d168726b0b5de3fb598b31d43 (patch) | |
tree | 490df3158e129f4593dac66318474057d86e3db0 | |
parent | 5198bce5ee4acf1ba1c7bd641fee089ebb4dc057 (diff) | |
download | NetworkManager-1acb351848e3718d168726b0b5de3fb598b31d43.tar.gz |
build/autotools: reject invalid sanitizer options in configure.ac
-rw-r--r-- | configure.ac | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 2d5e7241c8..960f957afd 100644 --- a/configure.ac +++ b/configure.ac @@ -1137,6 +1137,10 @@ if test "$with_address_sanitizer" = yes -o "$with_address_sanitizer" = "exec"; t else sanitizers="${sanitizers}address(executables-only) " fi +elif test "$with_address_sanitizer" = "" -o "$with_address_sanitizer" = no; then + with_address_sanitizer=no +else + AC_MSG_ERROR(["Invalid asan option --with-address-sanitizer=$with_address_sanitizer"]) fi AC_ARG_ENABLE(undefined-sanitizer, @@ -1152,6 +1156,10 @@ if test "${enable_undefined_sanitizer}" = "yes"; then sanitizer_exec_ldflags="$sanitizer_exec_ldflags -Wc,-fsanitize=undefined" sanitizer_lib_ldflags="$sanitizer_lib_ldflags -Wc,-fsanitize=undefined" sanitizers="${sanitizers}undefined-behavior " +elif test "$enable_undefined_sanitizer" = "" -o "$enable_undefined_sanitizer" = no; then + enable_undefined_sanitizer=no +else + AC_MSG_ERROR(["Invalid asan option --enable-undefined-sanitizer=$enable_undefined_sanitizer"]) fi if test -n "$sanitizers"; then |