support WANT_ASAN=1 on make command line in linux.370 and macOS.370
When the address sanitizer is in use for gcc, clang, or visual studio, (-fsanitize=address) define the NetHack preprocessor symbol USING_ADDRESS_SANITIZER.
This commit is contained in:
@@ -29,6 +29,9 @@ CCFLAGS = -g
|
||||
# CPLUSPLUS_NEED_DEPSUPPRESS = 1 C++ -Wno-deprecated-copy,
|
||||
# -Wno-deprecated-declarations
|
||||
|
||||
#ifeq "$(WANT_ASAN)" "1"
|
||||
NEED_ASAN=1
|
||||
#endif
|
||||
|
||||
# If you want to override the compiler detection just carried out
|
||||
# uncomment one of the following pairs. Note, however, that
|
||||
@@ -60,6 +63,10 @@ CFLAGS+=-Wmissing-prototypes
|
||||
CFLAGS+=-Wold-style-definition
|
||||
CFLAGS+=-Wstrict-prototypes
|
||||
|
||||
#ifeq "$(NEED_ASAN)" "1"
|
||||
CFLAGS+=-fsanitize=address
|
||||
#endif
|
||||
|
||||
#detection of clang vs gcc
|
||||
CCISCLANG := $(shell echo `$(CC) --version` | grep clang)
|
||||
ifeq "$(CCISCLANG)" ""
|
||||
|
||||
Reference in New Issue
Block a user