bpftool: Only build bpftool-prog-profile if supported by clang
authorSong Liu <songliubraving@fb.com>
Thu, 12 Mar 2020 18:23:30 +0000 (11:23 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 12 Mar 2020 23:08:33 +0000 (00:08 +0100)
commit14e5728ff8176d4d5924b0bf5ab9b1c94d6b3381
tree96fd81f008024bf24e32bd4633822a7eef9e9571
parentfe4eb069edb7ab845160350d9e67d572c026a4a7
bpftool: Only build bpftool-prog-profile if supported by clang

bpftool-prog-profile requires clang to generate BTF for global variables.
When compared with older clang, skip this command. This is achieved by
adding a new feature, clang-bpf-global-var, to tools/build/feature.

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20200312182332.3953408-2-songliubraving@fb.com
tools/bpf/bpftool/Makefile
tools/bpf/bpftool/prog.c
tools/build/feature/Makefile
tools/build/feature/test-clang-bpf-global-var.c [new file with mode: 0644]