From 39c352c89ba21b3c04c50d1f4d35af2f61848b94 Mon Sep 17 00:00:00 2001 From: radius Date: Fri, 2 Feb 2018 22:12:23 -0500 Subject: [PATCH] add address sanitizer support --- libretro/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libretro/Makefile b/libretro/Makefile index 45728504..535c6313 100644 --- a/libretro/Makefile +++ b/libretro/Makefile @@ -53,6 +53,12 @@ else endif endif +ifneq ($(SANITIZER),) + CFLAGS := -fsanitize=$(SANITIZER) $(CFLAGS) + CXXFLAGS := -fsanitize=$(SANITIZER) $(CXXFLAGS) + LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS) -lasan +endif + ifeq ($(platform), osx) ifndef ($(NOUNIVERSAL)) CFLAGS += $(ARCHFLAGS)