Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e54abac authored by Andrey Ryabinin's avatar Andrey Ryabinin Committed by Linus Torvalds
Browse files

kasan: Makefile: shut up warnings if CONFIG_COMPILE_TEST=y



It might be annoying to constantly see this:

	scripts/Makefile.kasan:16: Cannot use CONFIG_KASAN: -fsanitize=kernel-address is not supported by compiler

while performing allmodconfig/allyesconfig build tests.
Disable this warning if CONFIG_COMPILE_TEST=y.

Signed-off-by: default avatarAndrey Ryabinin <a.ryabinin@samsung.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6ceafb88
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -13,12 +13,16 @@ CFLAGS_KASAN := $(call cc-option, -fsanitize=kernel-address \
		--param asan-instrumentation-with-call-threshold=$(call_threshold))

ifeq ($(call cc-option, $(CFLAGS_KASAN_MINIMAL) -Werror),)
   ifneq ($(CONFIG_COMPILE_TEST),y)
        $(warning Cannot use CONFIG_KASAN: \
            -fsanitize=kernel-address is not supported by compiler)
   endif
else
    ifeq ($(CFLAGS_KASAN),)
        ifneq ($(CONFIG_COMPILE_TEST),y)
            $(warning CONFIG_KASAN: compiler does not support all options.\
                Trying minimal configuration)
        endif
        CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL)
    endif
endif