Skip to content

Commit

Permalink
kbuild: remove LLVM=1 test from HAS_LTO_CLANG
Browse files Browse the repository at this point in the history
As Documentation/kbuild/llvm.rst notes, LLVM=1 switches the default of
tools, but you can still override CC, LD, etc. individually. This LLVM=1
check is unneeded because each tool is already checked separately.

"make CC=clang LD=ld.lld NM=llvm-nm AR=llvm-ar LLVM_IAS=1 menuconfig"
should be able to enable Clang LTO.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
  • Loading branch information
Masahiro Yamada committed Mar 11, 2021
1 parent 64bfc99 commit 4c273d2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ config HAS_LTO_CLANG
def_bool y
# Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510
depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD
depends on $(success,test $(LLVM) -eq 1)
depends on $(success,test $(LLVM_IAS) -eq 1)
depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
Expand Down

0 comments on commit 4c273d2

Please sign in to comment.