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 c3ac5b458..28034cb07 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
@@ -76,6 +76,11 @@ else | |||
76 | CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,)) | 76 | CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,)) |
77 | endif | 77 | endif |
78 | endif | 78 | endif |
79 | ifeq ($(CONFIG_DEBUG_SANITIZE),y) | ||
80 | CFLAGS += $(call cc-option,-fsanitize=address,) | ||
81 | CFLAGS += $(call cc-option,-fsanitize=leak,) | ||
82 | CFLAGS += $(call cc-option,-fsanitize=undefined,) | ||
83 | endif | ||
79 | 84 | ||
80 | # If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)... | 85 | # If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)... |
81 | ARCH_FPIC ?= -fpic | 86 | ARCH_FPIC ?= -fpic |