@@ -610,8 +610,9 @@ CClink = $(CC)
610610
611611# Use this with GCC to check for mistakes, unused arguments, etc.
612612# Note: If you use -Wextra and get warnings in GTK code about function
613- # parameters, you can add -Wno-cast-function-type
613+ # parameters, you can add -Wno-cast-function-type (but not with clang)
614614# CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -Wno-cast-function-type -Wno-deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
615+ # CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -Wno-deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
615616# Add -Wpedantic to find // comments and other C99 constructs.
616617# Better disable Perl and Python to avoid a lot of warnings.
617618# CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wpedantic -Wunreachable-code -Wunused-result -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
@@ -690,15 +691,22 @@ LINT_OPTIONS = -beprxzF
690691
691692
692693# Uncomment one of the next two lines to compile Vim with the
693- # address sanitizer (asan) or with the undefined sanitizer. Works with gcc and
694- # clang. May make Vim twice as slow. Errors reported on stderr.
694+ # address sanitizer (asan) or with the undefined sanitizer. Works with gcc.
695+ # May make Vim twice as slow. Errors are reported on stderr.
695696# More at: https://code.google.com/p/address-sanitizer/
696697# Useful environment variables:
697698# $ export ASAN_OPTIONS="print_stacktrace=1 log_path=asan"
698699# $ export LSAN_OPTIONS="suppressions=`pwd`/testdir/lsan-suppress.txt"
699700# When running tests output can be found in testdir/asan.*
700701# SANITIZER_CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer
701702# SANITIZER_CFLAGS = -g -O0 -fsanitize=undefined -fno-omit-frame-pointer
703+
704+ # Similarly when compiling with clang and using ubsan.
705+ # $ export UBSAN_OPTIONS="print_stacktrace=1 log_path=ubsan"
706+ # $ export LSAN_OPTIONS="suppressions=`pwd`/testdir/lsan-suppress.txt"
707+ # When running tests output can be found in testdir/ubsan.*
708+ # SANITIZER_CFLAGS = -g -O0 -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer
709+
702710SANITIZER_LIBS = $(SANITIZER_CFLAGS )
703711
704712# MEMORY LEAK DETECTION
0 commit comments