[RAMEN9610-14440] UPSTREAM: kasan/Makefile: support LLVM style asan parameters
authorAndrey Ryabinin <aryabinin@virtuozzo.com>
Tue, 6 Feb 2018 23:36:08 +0000 (15:36 -0800)
committerhskang <hs1218.kang@samsung.com>
Sun, 21 Apr 2019 09:10:22 +0000 (18:10 +0900)
commit0af04e0391b5c46ea6003f357cedcdd70d4d9403
tree1a22ac681013a132d62d649aea9cb526ed9a2ac7
parenta5abc2dfee43a3458174f4bf0780dfd02ead4a52
[RAMEN9610-14440] UPSTREAM: kasan/Makefile: support LLVM style asan parameters

LLVM doesn't understand GCC-style paramters ("--param asan-foo=bar"), thus
we currently we don't use inline/globals/stack instrumentation when
building the kernel with clang.

Add support for LLVM-style parameters ("-mllvm -asan-foo=bar") to enable
all KASAN features.

Link: http://lkml.kernel.org/r/20171204191735.132544-3-paullawrence@google.com
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Greg Hackmann <ghackmann@google.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(Cherry-picked from 1a69e7ce8391a8bc808baf04e06d88ab4024ca47)

Change-Id: I6cf05bf35de7caff85a2f46b9f8581468ba9703e
Signed-off-by: Paul Lawrence <paullawrence@google.com>
scripts/Makefile.kasan