From nobody Mon Nov 25 04:59:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610958240; cv=none; d=zohomail.com; s=zohoarc; b=FR3QYdtD/ztwLb+kO8loL0Zyv/X0GprKbftfc+18Gqa9VmQBLi8RulDLOGHXlM7VqdVk+x0Ns4Qrd3TaLCMiEe2azHrQtjK2/Qhft2hWF0N4U4deTokB2byr8fCngfPcbJhDH4oBRPIs9GIEl+acGPfPNds2KCUKdUkah0bRL9o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610958240; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=qWGblCxxbIR1qum1H3hh8f91X7KJ/Gdb8/N33uS+AhY=; b=MbUOc3f0zFaP6jyxvMgQ1YEzS0Ib5gA/R+IM14MrTFtQw6lL9aFlSOjjaD1JlVW2RHSUkrtqKBDWtYtL7vinn7oths3Vq7Ilb4YVCbmIT0Zgll+fo6XUjZHADdfSgaIQE2DZHAZI9ifvOZH0UeDsfFNUTleoKel0YI6O0mD5yQo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1610958240236406.62635807690845; Mon, 18 Jan 2021 00:24:00 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-253-CFeMD9zEP1ukert_ulkIdQ-1; Mon, 18 Jan 2021 03:23:57 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A78F710054FF; Mon, 18 Jan 2021 08:23:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 761016267D; Mon, 18 Jan 2021 08:23:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 249C24BB7B; Mon, 18 Jan 2021 08:23:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10I8NiqY019257 for ; Mon, 18 Jan 2021 03:23:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id F273F272C8; Mon, 18 Jan 2021 08:23:43 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.193.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C532919D80 for ; Mon, 18 Jan 2021 08:23:40 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 7DE6724131F; Mon, 18 Jan 2021 09:23:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610958239; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qWGblCxxbIR1qum1H3hh8f91X7KJ/Gdb8/N33uS+AhY=; b=VKcnHfm9hKssTgNkwXpJK/sU3Y3u+tAnQKixv3J8gjY2LTEppm0lgJD74qk7HY1LivvC0f D2zeuRv61EVAP46BFBc94gw9a9QfF/srK0f2cM0FeEuemnm+I2lk9lMaJkrw0/8Hoqxokx 6SIac+HJJBrWmWX4MyvUWIX9/SJz8qA= X-MC-Unique: CFeMD9zEP1ukert_ulkIdQ-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH] meson: Fix build with -Dtest_coverage=true Date: Mon, 18 Jan 2021 09:23:34 +0100 Message-Id: <5870b054509855a8d22472d8af9ad8ae7d6f1769.1610958214.git.jdenemar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Jiri Denemark --- src/meson.build | 1 + tests/meson.build | 8 ++++++++ tools/nss/meson.build | 2 ++ tools/wireshark/src/meson.build | 3 +++ 4 files changed, 14 insertions(+) diff --git a/src/meson.build b/src/meson.build index 7c478219d6..980578d5d6 100644 --- a/src/meson.build +++ b/src/meson.build @@ -21,6 +21,7 @@ src_dep =3D declare_dependency( + coverage_flags + driver_modules_flags + win32_link_flags + + coverage_flags ), ) =20 diff --git a/tests/meson.build b/tests/meson.build index f1d91ca50d..c65487f5c2 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -202,6 +202,9 @@ foreach mock : mock_libs libvirt_lib, mock.get('link_with', []), ], + link_args: [ + coverage_flags, + ], ) endforeach =20 @@ -218,6 +221,7 @@ executable( ], link_args: [ libvirt_no_indirect, + coverage_flags ], ) =20 @@ -566,6 +570,7 @@ foreach data : tests ], link_args: [ libvirt_no_indirect, + coverage_flags, ], link_with: [ libvirt_lib, @@ -644,6 +649,9 @@ foreach data : helpers link_with: [ data['link_with'], ], + link_args: [ + coverage_flags, + ], export_dynamic: true, ) endforeach diff --git a/tools/nss/meson.build b/tools/nss/meson.build index cf3eec9b24..198936f3d4 100644 --- a/tools/nss/meson.build +++ b/tools/nss/meson.build @@ -66,6 +66,7 @@ nss_libvirt_lib =3D 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 =3D shared_library( link_args: [ nss_libvirt_guest_syms, libvirt_export_dynamic, + coverage_flags, ], link_whole: [ nss_libvirt_guest_impl, diff --git a/tools/wireshark/src/meson.build b/tools/wireshark/src/meson.bu= ild index 49ccc9bb86..9b452dc5ca 100644 --- a/tools/wireshark/src/meson.build +++ b/tools/wireshark/src/meson.build @@ -12,6 +12,9 @@ shared_library( xdr_dep, tools_dep, ], + link_args: [ + coverage_flags + ], install: true, install_dir: wireshark_plugindir, ) --=20 2.30.0