applets.h.sh: a script to check applet names against config options
[oweals/busybox.git] / Makefile.flags
index 9f77674baa1966fce1e5aee5d2ae8868bad55ae1..65021de25ffb3d7c2600d2be7fd3f57e4a8622b8 100644 (file)
@@ -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