From nobody Sun Feb 8 10:30:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1594894335; cv=none; d=zohomail.com; s=zohoarc; b=C7TUPxeVoh8Cm5ZRyb4iJVmhGnGXhKayDhmIAld2MBwT0xMwN6E9Nh7G9ocI2fcsnIp9L9+lAjciN7/3ZI0DkB9eI3qeGCNBl0m0GCdTmO8wOJ+So//1lR48+za4u5Nc6rZHOQXYqjmvtCICxWPrkI51lfmhs1dHNXv5KoZynPE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594894335; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JeXQjGhmTGsCQdJgbcd4igg7AbRppYehfJeJg2bZ4FY=; b=JVLYnSm3aaWvU4+Zrtj9/o0IUL5GwT2rW//chZ+qxcIpD3F2Y5Nuw41FjwDS99JCZYDCyS7RzG1ZmWDlR+Hm5Qiv54r+0MHq4bWenuDGESyJL8xSaxOmbBiVVF9EiwAxhvv0k6PJKpdt51dlLuYgSe32BVIH3eV/ntMJRLTVSmQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1594894335850674.0836451537361; Thu, 16 Jul 2020 03:12:15 -0700 (PDT) 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-408-qi1caJfUO2Gvv2qSEg7hNg-1; Thu, 16 Jul 2020 06:08:18 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F28481090; Thu, 16 Jul 2020 10:08:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D00C71053B01; Thu, 16 Jul 2020 10:08:12 +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 9CDE51804774; Thu, 16 Jul 2020 10:08:12 +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 06GA4LBQ017855 for ; Thu, 16 Jul 2020 06:04:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5E0712DE72; Thu, 16 Jul 2020 10:04:21 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id CBF452DE8F for ; Thu, 16 Jul 2020 10:04:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594894334; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=JeXQjGhmTGsCQdJgbcd4igg7AbRppYehfJeJg2bZ4FY=; b=Hyo9NTwr72Abl55jSphGSv6rBPppNPprh7mddR0wFKeL2ywvESxjtapKzA7Uyu/ZzovkTf 7T8unPyQSu3hynAL533v6+YPfUSCAq7AUfjmZL1ZOEd0x49eI6dz1OXe0b7EEHYfB6I6DK U9/L8pQfowSiT4NdElwk6LFY6asubtI= X-MC-Unique: qi1caJfUO2Gvv2qSEg7hNg-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 168/351] meson: src: add code to build shared modules Date: Thu, 16 Jul 2020 11:56:44 +0200 Message-Id: In-Reply-To: References: 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.84 on 10.5.11.22 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" Signed-off-by: Pavel Hrdina --- src/Makefile.am | 8 -------- src/meson.build | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 71a55e235f2..a9fce0444ed 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,12 +19,6 @@ # No libraries with the exception of LIBXML should be listed # here. List them against the individual XXX_la_CFLAGS targets # that actually use them. -AM_LDFLAGS_MOD =3D \ - -module \ - -avoid-version \ - $(LIBVIRT_NODELETE) \ - $(AM_LDFLAGS) -AM_LDFLAGS_MOD_NOUNDEF =3D $(AM_LDFLAGS_MOD) $(NO_UNDEFINED_LDFLAGS) =20 nodist_conf_DATA =3D DRIVER_SOURCE_FILES =3D @@ -81,8 +75,6 @@ include storage/Makefile.inc.am include remote/Makefile.inc.am =20 =20 -moddir =3D $(libdir)/libvirt/connection-driver - confdir =3D $(sysconfdir)/libvirt conf_DATA +=3D libvirt.conf =20 diff --git a/src/meson.build b/src/meson.build index 50f428da2ef..991991118ba 100644 --- a/src/meson.build +++ b/src/meson.build @@ -118,6 +118,19 @@ endif =20 libvirt_libs =3D [] =20 +# virt_modules: +# each entry is a dictionary with following items: +# * name - module name (required) +# * sources - module sources (optional, default []) +# * name_prefix - resulting library prefix (optional, default 'lib') +# * include - include_directories (optional, default []) +# * deps - dependencies (optional, default []) +# * link_with - static libraries to link with (optional, default []) +# * link_whole - static libraries to include (optional, default []) +# * link_args - arguments for linker (optional, default []) +# * install_dir - installation directory (optional, default libdir / 'li= bvirt' / 'connection-driver' +virt_modules =3D [] + =20 # list subdirectories =20 @@ -409,3 +422,37 @@ libvirt_admin_lib =3D shared_library( version: libvirt_lib_version, soversion: libvirt_so_version, ) + + +# build libvirt shared modules + +foreach module : virt_modules + mod =3D shared_module( + module['name'], + module.get('sources', []), + name_prefix: module.get('name_prefix', 'lib'), + include_directories: [ + conf_inc_dir, + module.get('include', []), + ], + dependencies: [ + src_dep, + module.get('deps', []), + ], + link_with: [ + libvirt_lib, + module.get('link_with', []), + ], + link_whole: [ + module.get('link_whole', []), + ], + link_args: [ + libvirt_nodelete, + module.get('link_args', []), + ], + install: true, + install_dir: module.get('install_dir', libdir / 'libvirt' / 'connectio= n-driver'), + install_rpath: libdir, + ) + set_variable('@0@_module'.format(module['name'].underscorify()), mod) +endforeach --=20 2.26.2