diff options
Diffstat (limited to 'Makefile.flags')
-rw-r--r-- | Makefile.flags | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile.flags b/Makefile.flags index 9f77674..65021de 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 |