Re: [PATCH v8 00/16] Add support for Clang LTO
From: Sami Tolvanen <samitolvanen@google.com>
Date: 2020-12-06 20:10:40
Also in:
linux-arch, linux-kbuild, linux-pci, lkml
From: Sami Tolvanen <samitolvanen@google.com>
Date: 2020-12-06 20:10:40
Also in:
linux-arch, linux-kbuild, linux-pci, lkml
On Sat, Dec 5, 2020 at 10:50 PM Nathan Chancellor [off-list ref] wrote:
On Fri, Dec 04, 2020 at 02:52:41PM -0800, Sami Tolvanen wrote:quoted
On Thu, Dec 3, 2020 at 2:32 PM Nick Desaulniers [off-list ref] wrote:quoted
So I'd recommend to Sami to simply make the Kconfig also depend on clang's integrated assembler (not just llvm-nm and llvm-ar).Sure, sounds good to me. What's the preferred way to test for this in Kconfig? It looks like actually trying to test if we have an LLVM assembler (e.g. using $(as-instr,.section ".linker-options","e",@llvm_linker_options)) doesn't work as Kconfig doesn't pass -no-integrated-as to clang here.
After a closer look, that's actually not correct, this seems to work with Clang+LLD no matter which assembler is used. I suppose we could test for .gasversion. to detect GNU as, but that's hardly ideal.
quoted
I could do something simple like $(success,echo $(LLVM) $(LLVM_IAS) | grep -q "1 1"). Thoughts? SamiI think depends on $(success,test $(LLVM_IAS) -eq 1) should work, at least according to my brief test.
Sure, looks good to me. However, I think we should also test for LLVM=1 to avoid possible further issues with mismatched toolchains instead of only checking for llvm-nm and llvm-ar. Sami _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel