> Am 05.07.2019 um 16:22 schrieb Daniel Borkmann <daniel@xxxxxxxxxxxxx>: > > On 07/01/2019 08:40 PM, Ilya Leoshkevich wrote: >> Am 01.07.2019 um 17:31 schrieb Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx>: >>> Do we still need clang | llc pipeline with new clang? Could the same >>> be achieved with single clang invocation? That would solve the problem >>> of not detecting pipeline failures. >> >> I’ve experimented with this a little, and found that new clang: >> >> - Does not understand -march, but -target is sufficient. >> - Understands -mcpu. >> - Understands -Xclang -target-feature -Xclang +foo as a replacement for >> -mattr=foo. >> >> However, there are two issues with that: >> >> - Don’t older clangs need to be supported? For example, right now alu32 >> progs are built conditionally. > > We usually require latest clang to be able to test most recent features like > BTF such that it helps to catch potential bugs in either of the projects > before release. > >> - It does not seem to be possible to build test_xdp.o without -target >> bpf. > > For everything non-tracing, it does not make sense to invoke clang w/o > the -target bpf flag, see also Documentation/bpf/bpf_devel_QA.rst +573 > for more explanation, so this needs to be present for building test_xdp.o. I'm referring to the test introduced in [1]. test_xdp.o might not be an ideal target, but even if it's replaced with a more suitable one, the llc invocation would still be required. So I could redo the patch as follows: - Replace test_xdp.o with get_cgroup_id_kern.o, use an intermediate .bc file. - Use clang without llc for all other eBPF programs. - Split out Kbuild include and order-only prerequisites. What do you think? [1] https://lore.kernel.org/netdev/1541593725-27703-1-git-send-email-quentin.monnet@xxxxxxxxxxxxx/ Best regards, Ilya