added optional sanitizer flags when using Clang
authorHolger Schemel <holger.schemel@virtion.de>
Thu, 20 Oct 2022 14:36:53 +0000 (16:36 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Thu, 20 Oct 2022 14:36:53 +0000 (16:36 +0200)
src/Makefile

index bea3ad8a11476e7d9c8874b2a3fc122589c6685b..ec8cb5e9224ae2eb74b8124dd5da4d1a472f0dd5 100644 (file)
@@ -72,6 +72,7 @@ endif
 
 ifeq ($(shell uname -s),Darwin)                # compiling on Mac OS X
 DEBUGGER = lldb --batch -o "run" -k "bt" -k "quit"
+SANITIZING_FLAGS = -fsanitize=undefined
 ifdef BUILD_DIST                       # distribution build
 MAC_TARGET_VERSION_MIN = 10.7
 EXTRA_FLAGS_MAC = -mmacosx-version-min=$(MAC_TARGET_VERSION_MIN)
@@ -127,6 +128,7 @@ CONFIG = $(CONFIG_BASE_PATH) $(JOYSTICK)
 DEBUG = -DDEBUG -g
 
 # ANALYZE = $(PROFILING_FLAGS)
+# ANALYZE = $(SANITIZING_FLAGS)
 
 # OPTIONS = $(DEBUG) -Wall                     # only for debugging purposes
 # OPTIONS = $(DEBUG) -O2 -Wall                 # only for debugging purposes