Kaydet (Commit) d293df0e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Explicit --with-valgrind, to not accidentally miss Valgrind support

Change-Id: If4de6e4cdebb082cbe8faa9392fceb61c3f8fb9e
üst cbe7bdfd
...@@ -1178,6 +1178,10 @@ libo_FUZZ_ARG_ENABLE(runtime-optimizations, ...@@ -1178,6 +1178,10 @@ libo_FUZZ_ARG_ENABLE(runtime-optimizations,
CC contains "-fsanitize=*". (For Valgrind, those runtime optimizations CC contains "-fsanitize=*". (For Valgrind, those runtime optimizations
are typically disabled dynamically via RUNNING_ON_VALGRIND.)])) are typically disabled dynamically via RUNNING_ON_VALGRIND.)]))
AC_ARG_WITH(valgrind,
AS_HELP_STRING([--with-valgrind],
[Make availability of Valgrind headers a hard requirement.]))
libo_FUZZ_ARG_ENABLE(compiler-plugins, libo_FUZZ_ARG_ENABLE(compiler-plugins,
AS_HELP_STRING([--enable-compiler-plugins], AS_HELP_STRING([--enable-compiler-plugins],
[Enable compiler plugins that will perform additional checks during [Enable compiler plugins that will perform additional checks during
...@@ -5746,7 +5750,7 @@ dnl =================================================================== ...@@ -5746,7 +5750,7 @@ dnl ===================================================================
dnl Check if valgrind headers are available dnl Check if valgrind headers are available
dnl =================================================================== dnl ===================================================================
ENABLE_VALGRIND= ENABLE_VALGRIND=
if test "$cross_compiling" != yes; then if test "$cross_compiling" != yes -a "$with_valgrind" != no; then
prev_cppflags=$CPPFLAGS prev_cppflags=$CPPFLAGS
# Is VALGRIND_CFLAGS something one is supposed to have in the environment, # Is VALGRIND_CFLAGS something one is supposed to have in the environment,
# or where does it come from? # or where does it come from?
...@@ -5757,6 +5761,9 @@ if test "$cross_compiling" != yes; then ...@@ -5757,6 +5761,9 @@ if test "$cross_compiling" != yes; then
fi fi
AC_SUBST([ENABLE_VALGRIND]) AC_SUBST([ENABLE_VALGRIND])
if test -z "$ENABLE_VALGRIND"; then if test -z "$ENABLE_VALGRIND"; then
if test "$with_valgrind" = yes; then
AC_MSG_ERROR([--with-valgrind specified but no Valgrind headers found])
fi
VALGRIND_CFLAGS= VALGRIND_CFLAGS=
fi fi
AC_SUBST([VALGRIND_CFLAGS]) AC_SUBST([VALGRIND_CFLAGS])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment