autotools: Align MSan checking code with CMake's implementation

This commit is contained in:
Hennadii Stepanov
2024-05-28 09:44:47 +01:00
parent abde59f52d
commit 396e885886

View File

@@ -50,10 +50,14 @@ AC_MSG_CHECKING(whether MemorySanitizer is enabled)
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#if defined(__has_feature)
# if __has_feature(memory_sanitizer)
# error "MemorySanitizer is enabled."
/* MemorySanitizer is enabled. */
# elif
# error "MemorySanitizer is disabled."
# endif
#else
# error "__has_feature is not defined."
#endif
]])], [msan_enabled=no], [msan_enabled=yes])
]])], [msan_enabled=yes], [msan_enabled=no])
AC_MSG_RESULT([$msan_enabled])
])