X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=Makefile.flags;h=65021de25ffb3d7c2600d2be7fd3f57e4a8622b8;hb=f4d0f4e7a9715375bfa4bcfb7ce26a967c78ca9e;hp=9f77674baa1966fce1e5aee5d2ae8868bad55ae1;hpb=c8e5ead03ac97da5b8a864481c8a790cfe8dfe4d;p=oweals%2Fbusybox.git diff --git a/Makefile.flags b/Makefile.flags index 9f77674ba..65021de25 100644 --- a/Makefile.flags +++ b/Makefile.flags @@ -75,6 +75,11 @@ else CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,)) endif endif +ifeq ($(CONFIG_DEBUG_SANITIZE),y) +CFLAGS += $(call cc-option,-fsanitize=address,) +CFLAGS += $(call cc-option,-fsanitize=leak,) +CFLAGS += $(call cc-option,-fsanitize=undefined,) +endif # If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)... ARCH_FPIC ?= -fpic