logging: Build log manager only when RPC is available

The logging manager is very closely tied to RPC. If we are
building without RPC support there's not much use for the
manager, in fact it fails to build.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2021-12-08 12:14:44 +01:00
parent 377f67d5b3
commit b7ccae7f1f
3 changed files with 36 additions and 22 deletions

18
src/libvirt_logging.syms Normal file
View File

@ -0,0 +1,18 @@
#
# Domain logging specific symbols
#
# logging/log_manager.h
virLogManagerDomainAppendMessage;
virLogManagerDomainGetLogFilePosition;
virLogManagerDomainOpenLogFile;
virLogManagerDomainReadLogFile;
virLogManagerFree;
virLogManagerNew;
# Let emacs know we want case-insensitive sorting
# Local Variables:
# sort-fold-case: t
# End:

View File

@ -1667,15 +1667,6 @@ virLockManagerPluginUsesState;
virLockManagerRelease; virLockManagerRelease;
# logging/log_manager.h
virLogManagerDomainAppendMessage;
virLogManagerDomainGetLogFilePosition;
virLogManagerDomainOpenLogFile;
virLogManagerDomainReadLogFile;
virLogManagerFree;
virLogManagerNew;
# security/security_driver.h # security/security_driver.h
virSecurityDriverLookup; virSecurityDriverLookup;

View File

@ -32,20 +32,25 @@ log_daemon_sources = files(
'log_handler.c', 'log_handler.c',
) )
log_driver_lib = static_library( if conf.has('WITH_REMOTE')
'virt_log_driver', log_driver_lib = static_library(
[ 'virt_log_driver',
log_driver_sources, [
log_protocol_generated, log_driver_sources,
], log_protocol_generated,
dependencies: [ ],
rpc_dep, dependencies: [
src_dep, rpc_dep,
xdr_dep, src_dep,
], xdr_dep,
) ],
)
libvirt_libs += log_driver_lib libvirt_libs += log_driver_lib
used_sym_files += 'libvirt_logging.syms'
else
sym_files += 'libvirt_logging.syms'
endif
if conf.has('WITH_LIBVIRTD') if conf.has('WITH_LIBVIRTD')
log_daemon_generated = custom_target( log_daemon_generated = custom_target(