]> gitweb.factorcode.org Git - factor.git/commitdiff
GNUmakefile: Add support for -fsanitize=address etc option.
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 15 May 2021 20:56:40 +0000 (15:56 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 15 May 2021 20:56:40 +0000 (15:56 -0500)
GNUmakefile

index 9061ccf7c6bed1b51e602daa9d494217fc22e998..b75a7aee7bf5bd30564635c66b245c6b890904b3 100644 (file)
@@ -27,6 +27,13 @@ ifdef CONFIG
 
        CXXFLAGS += -std=c++11
 
+       # SANITIZER=address ./build.sh compile
+       # address,thread,undefined,leak
+       ifneq ($(SANITIZER), 0)
+               CFLAGS += -fsanitize=$(SANITIZER)
+               CXXFLAGS += -fsanitize=$(SANITIZER)
+       endif
+
        ifneq ($(DEBUG), 0)
                CFLAGS += -g -DFACTOR_DEBUG
        else