Changeset View
Changeset View
Standalone View
Standalone View
configure.ac
Show First 20 Lines • Show All 266 Lines • ▼ Show 20 Lines | if test x$use_sanitizers != x; then | ||||
# Some compilers (e.g. GCC) require additional libraries like libasan, | # Some compilers (e.g. GCC) require additional libraries like libasan, | ||||
# libtsan, libubsan, etc. Make sure linking still works with the sanitize | # libtsan, libubsan, etc. Make sure linking still works with the sanitize | ||||
# flag. This is a separate check so we can give a better error message when | # flag. This is a separate check so we can give a better error message when | ||||
# the sanitize flags are supported by the compiler but the actual sanitizer | # the sanitize flags are supported by the compiler but the actual sanitizer | ||||
# libs are missing. | # libs are missing. | ||||
AX_CHECK_LINK_FLAG( | AX_CHECK_LINK_FLAG( | ||||
[[-fsanitize=$use_sanitizers]], | [[-fsanitize=$use_sanitizers]], | ||||
[[SANITIZER_LDFLAGS=-fsanitize=$use_sanitizers]], | [[SANITIZER_LDFLAGS=-fsanitize=$use_sanitizers]], | ||||
[AC_MSG_ERROR([linker did not accept requested flags, you are missing required libraries])]) | [AC_MSG_ERROR([linker did not accept requested flags, you are missing required libraries])], | ||||
[], | |||||
[AC_LANG_PROGRAM([[ | |||||
#include <cstdint> | |||||
#include <cstddef> | |||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { return 0; } | |||||
__attribute__((weak)) // allow for libFuzzer linking | |||||
]],[[]])]) | |||||
fi | fi | ||||
ERROR_CXXFLAGS= | ERROR_CXXFLAGS= | ||||
if test "x$enable_werror" = "xyes"; then | if test "x$enable_werror" = "xyes"; then | ||||
if test "x$CXXFLAG_WERROR" = "x"; then | if test "x$CXXFLAG_WERROR" = "x"; then | ||||
AC_MSG_ERROR("enable-werror set but -Werror is not usable") | AC_MSG_ERROR("enable-werror set but -Werror is not usable") | ||||
fi | fi | ||||
AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]]) | AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]]) | ||||
▲ Show 20 Lines • Show All 1,068 Lines • Show Last 20 Lines |