Subject: [PATCH 08/15] kbuild: add CONFIG_LD_IS_LLD

From: Sami Tolvanen <[email-masked]>
Date: Tue, 28 Apr 2020 15:14:15 -0700

commit b744b43f79cc758127042e71f9ad7b1afda30f84 upstream.

Similarly to the CC_IS_CLANG config, add LD_IS_LLD to avoid GNU ld
specific logic such as ld-version or ld-ifversion and gain the
ability to select potential features that depend on the linker at
configuration time such as LTO.

Signed-off-by: Sami Tolvanen <[email-masked]>
Acked-by: Masahiro Yamada <[email-masked]>
[nc: Reword commit message]
Signed-off-by: Nathan Chancellor <[email-masked]>
Tested-by: Sedat Dilek <[email-masked]>
Reviewed-by: Sedat Dilek <[email-masked]>
Signed-off-by: Thomas Bogendoerfer <[email-masked]>
Signed-off-by: Nick Desaulniers <[email-masked]>
---
 init/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/init/Kconfig b/init/Kconfig
index 96fc45d1b686..d74f152e6b98 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -20,6 +20,9 @@ config GCC_VERSION
 config CC_IS_CLANG
 	def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)
 
+config LD_IS_LLD
+	def_bool $(success,$(LD) -v | head -n 1 | grep -q LLD)
+
 config CLANG_VERSION
 	int
 	default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
-- 
2.31.0.rc2.261.g7f71774620-goog