From daa33c5af10e09eb5dcfe23454100610077ad710 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Sat, 4 Jul 2020 21:07:38 +0200 Subject: [PATCH] Make sure SANITIZE can be used properly when needed --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0a2d6145..e8e7ee85 100644 --- a/Makefile +++ b/Makefile @@ -227,7 +227,7 @@ LDFLAGS += -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed ifndef DEBUG CFLAGS += -Ofast else - CFLAGS += -g -rdynamic -funwind-tables -DDEBUG -Wl,--export-dynamic + CFLAGS += -g -rdynamic -funwind-tables -fno-omit-frame-pointer -DDEBUG -Wl,--export-dynamic endif #LTO is supposed to reduced code size and increased execution speed. For Amiberry, it does not. @@ -256,7 +256,7 @@ ifdef USE_PROFILE endif ifdef SANITIZE - LDFLAGS += -lasan + export LDFLAGS := -lasan $(LDFLAGS) CFLAGS += -fsanitize=leak -fsanitize-recover=address endif