aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-09-08 08:20:40 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-09-08 08:20:40 +0800
commita0dfc38289c33de3c40c28b01b047dbadafecf3e (patch)
tree0234e6f8870ebb2e8f774d68a80bd193d3e49428
parent36db42475e700b4773e689a97a3c8a72e9793f0f (diff)
downloadtangerine-mcl-a0dfc38289c33de3c40c28b01b047dbadafecf3e.tar.gz
tangerine-mcl-a0dfc38289c33de3c40c28b01b047dbadafecf3e.tar.zst
tangerine-mcl-a0dfc38289c33de3c40c28b01b047dbadafecf3e.zip
add sanitize option if DEBUG=1
-rw-r--r--common.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/common.mk b/common.mk
index d8ecaf5..2ca4006 100644
--- a/common.mk
+++ b/common.mk
@@ -31,8 +31,10 @@ AR=ar r
MKDIR=mkdir -p
RM=rm -rf
-
-ifneq ($(DEBUG),1)
+ifeq ($(DEBUG),1)
+ CFLAGS+=-fsanitize=address
+ LDFLAGS+=-fsanitize=address
+else
CFLAGS_OPT+=-fomit-frame-pointer -DNDEBUG
ifeq ($(CXX),clang++)
CFLAGS_OPT+=-O3