Rather than static linking in various of the helper libraries to
libvirt_lxc, just link against the main libvirt.so. This is more memory
and time efficient because it will already be cached in memory and
sharable between processes.
CAPNG flags need adding because the LXC code directly calls various
libcapng APIs and no longer inherits the CAPNG flags via the statically
linked .a libs.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/Makefile.am | 10 +++++-----
src/libvirt_private.syms | 2 ++
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 5d84396644..7f9961fe55 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3113,14 +3113,12 @@ libvirt_lxc_SOURCES = \
libvirt_lxc_LDFLAGS = \
$(AM_LDFLAGS) \
$(PIE_LDFLAGS) \
+ $(CAPNG_LIBS) \
+ $(LIBXML_LIBS) \
$(NULL)
libvirt_lxc_LDADD = \
$(FUSE_LIBS) \
- libvirt-net-rpc-server.la \
- libvirt-net-rpc.la \
- libvirt_security_manager.la \
- libvirt_conf.la \
- libvirt_util.la \
+ libvirt.la \
../gnulib/lib/libgnu.la
if WITH_DTRACE_PROBES
libvirt_lxc_LDADD += libvirt_probes.lo
@@ -3130,6 +3128,8 @@ libvirt_lxc_CFLAGS = \
-I$(srcdir)/conf \
$(AM_CFLAGS) \
$(PIE_CFLAGS) \
+ $(CAPNG_CFLAGS) \
+ $(LIBXML_CFLAGS) \
$(LIBNL_CFLAGS) \
$(FUSE_CFLAGS) \
$(DBUS_CFLAGS) \
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 3ec510bd32..bbe97b161f 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -347,6 +347,7 @@ virDomainDiskSetSource;
virDomainDiskSetType;
virDomainFSDefFree;
virDomainFSDefNew;
+virDomainFSDriverTypeToString;
virDomainFSIndexByName;
virDomainFSInsert;
virDomainFSRemove;
@@ -470,6 +471,7 @@ virDomainObjGetOneDefState;
virDomainObjGetPersistentDef;
virDomainObjGetState;
virDomainObjNew;
+virDomainObjParseFile;
virDomainObjParseNode;
virDomainObjRemoveTransientDef;
virDomainObjSetDefTransient;
--
2.14.3