arch: enable HAS_LTO_CLANG with KASAN and KCOV
[linux-2.6-microblaze.git] / arch / Kconfig
index b2872e9..94050a3 100644 (file)
@@ -732,7 +732,9 @@ config HAS_LTO_CLANG
        depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
        depends on ARCH_SUPPORTS_LTO_CLANG
        depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
-       depends on !KASAN || KASAN_HW_TAGS
+       # https://github.com/ClangBuiltLinux/linux/issues/1721
+       depends on (!KASAN || KASAN_HW_TAGS || CLANG_VERSION >= 170000) || !DEBUG_INFO
+       depends on (!KCOV || CLANG_VERSION >= 170000) || !DEBUG_INFO
        depends on !GCOV_KERNEL
        help
          The compiler and Kconfig options support building with Clang's