Skip to content
Commit 349fde59 authored by Jakob Koschel's avatar Jakob Koschel Committed by Andrew Morton
Browse files

arch: enable HAS_LTO_CLANG with KASAN and KCOV

Both KASAN and KCOV had issues with LTO_CLANG if DEBUG_INFO is enabled. 
With LTO inlinable function calls are required to have debug info if they
are inlined into a function that has debug info.

Starting with LLVM 17 this will be fixed ([1],[2]) and enabling LTO with
KASAN/KCOV and DEBUG_INFO doesn't cause linker errors anymore.

Link: https://github.com/llvm/llvm-project/commit/913f7e93dac67ecff47bade862ba42f27cb68ca9
Link: https://github.com/llvm/llvm-project/commit/4a8b1249306ff11f229320abdeadf0c215a00400
Link: https://lkml.kernel.org/r/20230717-enable-kasan-lto1-v3-1-650e1efc19d1@gmail.com


Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarJakob Koschel <jkl820.git@gmail.com>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Tom Rix <trix@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent d9efb07d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment