提交 e5df4ede 编写于 作者: D Daniel P. Berrangé

src: don't statically link code that's already in libvirt.so

Various binaries are statically linking to libvirt_util.la and
other intermediate libraries we build. These intermediate libs
all get built into the main libvirt.so shared library eventually,
so we can dynamically link to that instead and reduce the on disk
footprint.

In libvirt-daemon RPM:

            virtlockd: 1.6 MB -> 153 KB
             virtlogd: 1.6 MB -> 157 KB
     libvirt_iohelper: 937 KB -> 23 KB

In libvirt-daemon-driver-network RPM:

 libvirt_leaseshelper: 940 KB -> 26 KB

In libvirt-daemon-driver-storage-core RPM:

   libvirt_parthelper: 926 KB -> 21 KB

IOW, about 5.6 MB total space saving in a build done on Fedora 30
x86_64 architecture.
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 3c8d5762
......@@ -851,7 +851,7 @@ libvirt_iohelper_LDFLAGS = \
$(PIE_LDFLAGS) \
$(NULL)
libvirt_iohelper_LDADD = \
libvirt_util.la \
libvirt.la \
../gnulib/lib/libgnu.la
if WITH_DTRACE_PROBES
libvirt_iohelper_LDADD += libvirt_probes.lo
......
......@@ -176,6 +176,7 @@ virNetServerClientSetAuthLocked;
virNetServerClientSetAuthPendingLocked;
virNetServerClientSetCloseHook;
virNetServerClientSetDispatcher;
virNetServerClientSetQuietEOF;
virNetServerClientSetReadonly;
virNetServerClientStartKeepAlive;
virNetServerClientWantCloseLocked;
......
......@@ -145,10 +145,8 @@ virtlockd_LDFLAGS = \
$(NO_UNDEFINED_LDFLAGS) \
$(NULL)
virtlockd_LDADD = \
libvirt.la \
libvirt_driver_admin.la \
libvirt-net-rpc-server.la \
libvirt-net-rpc.la \
libvirt_util.la \
../gnulib/lib/libgnu.la \
$(CYGWIN_EXTRA_LIBADD) \
$(NULL)
......
......@@ -80,9 +80,7 @@ virtlogd_LDFLAGS = \
$(NULL)
virtlogd_LDADD = \
libvirt_driver_admin.la \
libvirt-net-rpc-server.la \
libvirt-net-rpc.la \
libvirt_util.la \
libvirt.la \
../gnulib/lib/libgnu.la \
$(CYGWIN_EXTRA_LIBADD) \
$(NULL)
......
......@@ -56,7 +56,7 @@ libvirt_leaseshelper_LDFLAGS = \
$(PIE_LDFLAGS) \
$(NULL)
libvirt_leaseshelper_LDADD = \
libvirt_util.la \
libvirt.la \
../gnulib/lib/libgnu.la
if WITH_DTRACE_PROBES
libvirt_leaseshelper_LDADD += libvirt_probes.lo
......
......@@ -72,8 +72,6 @@ virt_aa_helper_LDFLAGS = \
$(NULL)
virt_aa_helper_LDADD = \
libvirt.la \
libvirt_conf.la \
libvirt_util.la \
libvirt_driver_storage_impl.la \
../gnulib/lib/libgnu.la \
$(NULL)
......
......@@ -378,7 +378,7 @@ libvirt_parthelper_LDFLAGS = \
$(NULL)
libvirt_parthelper_LDADD = \
$(LIBPARTED_LIBS) \
libvirt_util.la \
libvirt.la \
../gnulib/lib/libgnu.la \
$(NULL)
if WITH_DTRACE_PROBES
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册