Hi Greg and Sasha,
Please apply the following mbox files to their respective trees. They contain upstream patches that allow a tip of tree LLD to link an x86 kernel image as well as a patch to avoid using $(LD) to check for the location of binutils, which won't always be accurate when linking with LLD. This was tested with both the upstream defconfig and Android's x86_64_cuttlefish_defconfig in their respective trees (building/linking with both Clang/LLD and GCC/ld.bfd then booting in QEMU).
For 5.0, a simple cherry-pick of commit ad15006cc784 ("kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD") will do.
Greg, the merge into kernel/common will result in two conflicts:
* Makefile: Make the diff match upstream commit ad15006cc784 ("kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD")
* arch/x86/entry/vdso/Makefile: Take the right hand side, effectively replacing common commit 35b779802c2e ("x86: vdso: Fix leaky vdso linker with CC=clang.") with the proper upstream commit 379d98ddf413 ("x86: vdso: Use $LD instead of $CC to link")
Also, while you are at it, would you mind picking up upstream commit 5f074f3e192f ("lib/string.c: implement a basic bcmp")? It is cc'd for stable but it's worth mentioning now so we can stop carrying it out of tree :)
Let me know if there are any issues, comments, or concerns, Nathan