X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=6ded0df0064740706a0436917d1af5caba52d77c;hb=dcaa32ddfd2c74db639452d6aee456d41d502700;hp=8cbf5c66b9863df2bcf404dca87b3e5db65fd9aa;hpb=4cfc568dce10c4ff9a476e229c56b17f8f1ed678;p=pcsx_rearmed.git diff --git a/Makefile b/Makefile index 8cbf5c66..6ded0df0 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,9 @@ CFLAGS += -Wall -ggdb -Iinclude -ffast-math ifndef DEBUG CFLAGS += -O2 -DNDEBUG endif +ifeq ($(DEBUG_ASAN), 1) +CFLAGS += -fsanitize=address +endif CFLAGS += -DP_HAVE_MMAP=$(if $(NO_MMAP),0,1) \ -DP_HAVE_PTHREAD=$(if $(NO_PTHREAD),0,1) \ -DP_HAVE_POSIX_MEMALIGN=$(if $(NO_POSIX_MEMALIGN),0,1) \ @@ -36,6 +39,9 @@ endif CC_LINK ?= $(CC) CC_AS ?= $(CC) LDFLAGS += $(MAIN_LDFLAGS) +ifeq ($(DEBUG_ASAN), 1) +LDFLAGS += -static-libasan +endif EXTRA_LDFLAGS ?= -Wl,-Map=$@.map LDLIBS += $(MAIN_LDLIBS) ifdef PCNT @@ -156,7 +162,7 @@ OBJS += plugins/gpu_unai/gpulib_if.o ifeq "$(ARCH)" "arm" OBJS += plugins/gpu_unai/gpu_arm.o endif -plugins/gpu_unai/gpulib_if.o: CFLAGS += -DREARMED -O3 +plugins/gpu_unai/gpulib_if.o: CFLAGS += -DREARMED -DUSE_GPULIB=1 -O3 CC_LINK = $(CXX) endif