mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
meson: Fix build with -Dtest_coverage=true
As can be seen in commit 8a62a1592ae00eab4eb153c02661e56b9d8d9032 (from autoconf era), the coverage flags have to be used also when linking objects. However, this was not reflected when we switched to meson. Without this patch linking fails with undefined references to various __gcov_* symbols. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
85523cfae0
commit
36b47ffed9
@ -26,7 +26,10 @@ tests_dep = declare_dependency(
|
||||
top_inc_dir,
|
||||
util_inc_dir,
|
||||
],
|
||||
link_args: libvirt_export_dynamic,
|
||||
link_args: (
|
||||
libvirt_export_dynamic
|
||||
+ coverage_flags
|
||||
),
|
||||
)
|
||||
|
||||
tests_env = [
|
||||
@ -228,9 +231,6 @@ executable(
|
||||
dependencies: [
|
||||
tests_dep,
|
||||
],
|
||||
link_args: [
|
||||
coverage_flags,
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
|
@ -66,6 +66,7 @@ nss_libvirt_lib = shared_module(
|
||||
link_args: [
|
||||
nss_libvirt_syms,
|
||||
libvirt_export_dynamic,
|
||||
coverage_flags,
|
||||
],
|
||||
link_whole: [
|
||||
nss_libvirt_impl,
|
||||
@ -81,6 +82,7 @@ nss_libvirt_guest_lib = shared_library(
|
||||
link_args: [
|
||||
nss_libvirt_guest_syms,
|
||||
libvirt_export_dynamic,
|
||||
coverage_flags,
|
||||
],
|
||||
link_whole: [
|
||||
nss_libvirt_guest_impl,
|
||||
|
@ -12,6 +12,9 @@ shared_library(
|
||||
xdr_dep,
|
||||
tools_dep,
|
||||
],
|
||||
link_args: [
|
||||
coverage_flags
|
||||
],
|
||||
install: true,
|
||||
install_dir: wireshark_plugindir,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user