mirror of https://github.com/google/oss-fuzz.git
sudoers: fix build with --sanitizer none (#9751)
A space was being removed from CFLAGS when SANITIZER_FLAGS was empty, resulting in a build error.
This commit is contained in:
parent
51983f932e
commit
8ff7ef1aba
|
@ -20,13 +20,16 @@ env
|
||||||
|
|
||||||
# Some of the sanitizer flags cause issues with configure tests.
|
# Some of the sanitizer flags cause issues with configure tests.
|
||||||
# Pull them out of CFLAGS and pass them to configure instead.
|
# Pull them out of CFLAGS and pass them to configure instead.
|
||||||
if [ $SANITIZER == "coverage" ]; then
|
if [ $SANITIZER == "coverage" -a -n "$COVERAGE_FLAGS" ]; then
|
||||||
CFLAGS="`echo \"$CFLAGS\" | sed \"s/ $COVERAGE_FLAGS//\"`"
|
CFLAGS="`echo \"$CFLAGS\" | sed \"s/ $COVERAGE_FLAGS//\"`"
|
||||||
sanitizer_opts="$COVERAGE_FLAGS"
|
sanitizer_opts="$COVERAGE_FLAGS"
|
||||||
else
|
elif [ -n "$SANITIZER_FLAGS" ]; then
|
||||||
CFLAGS="`echo \"$CFLAGS\" | sed \"s/ $SANITIZER_FLAGS//\"`"
|
CFLAGS="`echo \"$CFLAGS\" | sed \"s/ $SANITIZER_FLAGS//\"`"
|
||||||
sanitizer_opts="$SANITIZER_FLAGS"
|
sanitizer_opts="$SANITIZER_FLAGS"
|
||||||
|
else
|
||||||
|
sanitizer_opts=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# This is already added by --enable-fuzzer
|
# This is already added by --enable-fuzzer
|
||||||
CFLAGS="`echo \"$CFLAGS\" | sed 's/ -fsanitize=fuzzer-no-link//'`"
|
CFLAGS="`echo \"$CFLAGS\" | sed 's/ -fsanitize=fuzzer-no-link//'`"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue