Merge pull request #23383 from yuwata/meson-suppress-warning

meson: suppress warning
This commit is contained in:
Luca Boccassi 2022-05-16 17:57:13 +01:00 committed by GitHub
commit 9d9310e5f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 28 deletions

View file

@ -1003,8 +1003,8 @@ 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' or not libbpf.found()
conf.set10('BPF_FRAMEWORK', 0)
if want_bpf_framework == 'false' or not libbpf.found() or skip_deps
conf.set10('BPF_FRAMEWORK', false)
else
# Support 'versioned' clang/llvm-strip binaries, as seen on Debian/Ubuntu
# (like clang-10/llvm-strip-10)
@ -1012,11 +1012,7 @@ else
r = find_program('clang', required : bpf_framework_required, version : '>= 10.0.0')
clang_found = r.found()
if clang_found
if meson.version().version_compare('>= 0.55')
clang = [r.full_path()]
else
clang = [r.path()]
endif
clang = r.path()
endif
# Assume that the required flags are supported by the found clang.
clang_supports_flags = clang_found
@ -1580,20 +1576,6 @@ if dbus_interfaces_dir == '' or dbus_interfaces_dir == 'yes'
endif
endif
endif
if dbus_interfaces_dir == dbusdatadir / 'interfaces' or dbus_interfaces_dir == 'no'
dbus_interfaces_dir_name = 'interfaces'
dbus_interfaces_dir_parent = dbusdatadir
else
elements = dbus_interfaces_dir.split('/')
dbus_interfaces_dir_name = elements[-1]
dbus_interfaces_dir_parent = '/'
foreach elem : elements
if elem == dbus_interfaces_dir_name and dbus_interfaces_dir == dbus_interfaces_dir_parent / dbus_interfaces_dir_name
break
endif
dbus_interfaces_dir_parent = dbus_interfaces_dir_parent / elem
endforeach
endif
# We support one or the other. If gcrypt is available, we assume it's there to
# be used, and use it in preference.
@ -4103,9 +4085,9 @@ alias_target('update-man-rules', update_man_rules)
if not meson.is_cross_build()
custom_target(
'export-dbus-interfaces',
output : dbus_interfaces_dir_name,
output : fs.name(dbus_interfaces_dir),
install : dbus_interfaces_dir != 'no',
install_dir : dbus_interfaces_dir_parent,
install_dir : fs.parent(dbus_interfaces_dir),
command : [export_dbus_interfaces_py, '@OUTPUT@', dbus_programs])
endif

View file

@ -33,11 +33,7 @@ cpu_arch_defines = {
clang_arch_flags = cpu_arch_defines.get(host_machine.cpu_family(),
['-D__@0@__'.format(host_machine.cpu_family())])
if meson.version().version_compare('>= 0.58')
libbpf_include_dir = libbpf.get_variable('includedir')
else
libbpf_include_dir = libbpf.get_variable(pkgconfig : 'includedir')
endif
libbpf_include_dir = libbpf.get_variable(pkgconfig : 'includedir')
bpf_o_unstripped_cmd = [
clang,