]> git.ipfire.org Git - thirdparty/systemd.git/commit
meson, bpf: add HAVE_LIBBPF, BPF_FRAMEWORK options
authorJulia Kartseva <hex@fb.com>
Sat, 14 Nov 2020 01:08:15 +0000 (17:08 -0800)
committerJulia Kartseva <hex@fb.com>
Mon, 26 Apr 2021 23:20:58 +0000 (16:20 -0700)
commit7d861e12637892f1fcf7bbd69e4aec5a096f4bcb
treedb9ca703607e12be7bfbd6a9feb57167da1829ba
parentcf4f9a57f20f1b21d59574e1f0cb6504506f1728
meson, bpf: add HAVE_LIBBPF, BPF_FRAMEWORK options

* Add `bpf-framework` feature gate with 'auto', 'true' and 'false' choices
* Add libbpf [0] dependency
* Search for clang llvm-strip and bpftool binaries in compile time to
generate bpf skeleton.

For libbpf [0], make 0.2.0 [1] the minimum required version.
If libbpf is satisfied, set HAVE_LIBBPF config option to 1.

If `bpf-framework` feature gate is set to 'auto', means that whether
bpf feature is enabled or now is defined by the presence of all of
libbpf, clang, llvm and bpftool in build
environment.
With 'auto' all dependencies are optional.
If the gate is set to `true`, make all of the libbpf, clang and llvm
dependencies mandatory.
If it's set to `false`, set `BPF_FRAMEWORK` to false and make libbpf
dependency optional.

libbpf dependency is dynamic followed by the common pattern in systemd.

meson, bpf: add build rule for socket_bind program
meson.build
meson_options.txt