From: Doug Coleman Date: Sat, 15 May 2021 20:56:40 +0000 (-0500) Subject: GNUmakefile: Add support for -fsanitize=address etc option. X-Git-Tag: 0.99~2280 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=b3d7e1158cda71492bb320d1c9618c78eb686274 GNUmakefile: Add support for -fsanitize=address etc option. --- diff --git a/GNUmakefile b/GNUmakefile index 9061ccf7c6..b75a7aee7b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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