]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: skip to search clang, llvm-string, and bpftool, if libbpf not found
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 Jan 2022 09:46:09 +0000 (18:46 +0900)
committerEvgeny Vereshchagin <evvers@ya.ru>
Wed, 19 Jan 2022 11:23:41 +0000 (14:23 +0300)
Prompted by https://github.com/systemd/systemd/pull/22093#issuecomment-1016254914.

meson.build

index 94b67f6b71490c3d53fe384bfcb3c98991d68170..0abdd3661635a019b2c1fb468f75912d605b3dbe 100644 (file)
@@ -984,7 +984,7 @@ bpf_framework_required = want_bpf_framework == 'true'
 libbpf = dependency('libbpf', required : bpf_framework_required, version : '>= 0.2')
 conf.set10('HAVE_LIBBPF', libbpf.found())
 
-if want_bpf_framework == 'false'
+if want_bpf_framework == 'false' or not libbpf.found()
         conf.set10('BPF_FRAMEWORK', 0)
 else
         # Support 'versioned' clang/llvm-strip binaries, as seen on Debian/Ubuntu
@@ -1030,7 +1030,7 @@ else
                                required : bpf_framework_required,
                                version : '>= 5.6')
 
-        deps_found = libbpf.found() and clang_found and clang_supports_bpf and clang_supports_flags and llvm_strip.found() and bpftool.found()
+        deps_found = clang_found and clang_supports_bpf and clang_supports_flags and llvm_strip.found() and bpftool.found()
 
         # Can build BPF program from source code in restricted C
         conf.set10('BPF_FRAMEWORK', deps_found)