mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
meson: set minimum clang/llvm versions for bpf support
The minimum clang/llvm-strip version needed for building libbpf based programs is 10.0.0, this is documented here: https://github.com/libbpf/libbpf/tree/v0.6.1#bpf-co-re-compile-once--run-everywhere Using an older version such as 9.0.0 will generate objects that bpftool will not be able to generate skeletons for.
This commit is contained in:
parent
bbe5371345
commit
408832e603
@ -988,7 +988,7 @@ else
|
|||||||
# Support 'versioned' clang/llvm-strip binaries, as seen on Debian/Ubuntu
|
# Support 'versioned' clang/llvm-strip binaries, as seen on Debian/Ubuntu
|
||||||
# (like clang-10/llvm-strip-10)
|
# (like clang-10/llvm-strip-10)
|
||||||
if meson.is_cross_build() or cc.get_id() != 'clang' or cc.cmd_array()[0].contains('afl-clang') or cc.cmd_array()[0].contains('hfuzz-clang')
|
if meson.is_cross_build() or cc.get_id() != 'clang' or cc.cmd_array()[0].contains('afl-clang') or cc.cmd_array()[0].contains('hfuzz-clang')
|
||||||
r = find_program('clang', required : bpf_framework_required)
|
r = find_program('clang', required : bpf_framework_required, version : '>= 10.0.0')
|
||||||
clang_found = r.found()
|
clang_found = r.found()
|
||||||
if clang_found
|
if clang_found
|
||||||
if meson.version().version_compare('>= 0.55')
|
if meson.version().version_compare('>= 0.55')
|
||||||
@ -1018,7 +1018,7 @@ else
|
|||||||
else
|
else
|
||||||
llvm_strip_bin = 'llvm-strip'
|
llvm_strip_bin = 'llvm-strip'
|
||||||
endif
|
endif
|
||||||
llvm_strip = find_program(llvm_strip_bin, required : bpf_framework_required)
|
llvm_strip = find_program(llvm_strip_bin, required : bpf_framework_required, version : '>= 10.0.0')
|
||||||
|
|
||||||
# Debian installs this in /usr/sbin/ which is not in $PATH.
|
# Debian installs this in /usr/sbin/ which is not in $PATH.
|
||||||
# We check for 'bpftool' first, honouring $PATH, and in /usr/sbin/ for Debian.
|
# We check for 'bpftool' first, honouring $PATH, and in /usr/sbin/ for Debian.
|
||||||
|
Loading…
Reference in New Issue
Block a user