Commit 5c62618f authored by Seth Howell's avatar Seth Howell Committed by Ben Walker
Browse files

module/event: add subsystem interdependencies



The SPDK application framework defines a list of event subsystem
dependencies. When linking against individual shared libraries, it is
useful for this dependency structure to be codified in the shared
libraries themselves.

For example, when linking a bdev based application against
libspdk_bdev.so, one might wish to only specify this shared object at
link time. However, when you actually run the application, it will fail
to start because it is not linked to the copy and vmd subsystems.
However, once thesedependencies are added, one can effectively link
against only the exact subsystems they need and any dependent subsystems
will be linked in automatically.

Change-Id: Ic986281a162ac20b523486e9f8cccf4a0787afd7
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466081


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 8a80461a
Loading
Loading
Loading
Loading
+15 −9
Original line number Diff line number Diff line
@@ -130,15 +130,21 @@ DEPDIRS-bdev_virtio := $(BDEV_DEPS_CONF_THREAD) virtio

# module/event
# module/event/app
DEPDIRS-app_rpc := event $(JSON_LIBS) thread util
DEPDIRS-app_rpc := log util thread event $(JSON_LIBS)

# module/event/subsystems
DEPDIRS-event_bdev := bdev event
# These depdirs include subsystem interdependencies which
# are not related to symbols, but are defined directly in
# the SPDK event subsystem code.
DEPDIRS-event_copy := copy event
DEPDIRS-event_iscsi := event iscsi
DEPDIRS-event_nbd := event nbd
DEPDIRS-event_net := sock net event
DEPDIRS-event_nvmf := $(BDEV_DEPS_CONF_THREAD) event nvme nvmf
DEPDIRS-event_scsi := event scsi
DEPDIRS-event_vhost := event vhost
DEPDIRS-event_vmd := conf vmd event
DEPDIRS-event_vmd := vmd conf $(JSON_LIBS) event

DEPDIRS-event_bdev := bdev event event_copy event_vmd

DEPDIRS-event_nbd := event nbd event_bdev
DEPDIRS-event_nvmf := $(BDEV_DEPS_CONF_THREAD) event nvme nvmf event_bdev
DEPDIRS-event_scsi := event scsi event_bdev

DEPDIRS-event_iscsi := event iscsi event_scsi
DEPDIRS-event_vhost := event vhost event_scsi
+11 −0
Original line number Diff line number Diff line
@@ -42,6 +42,17 @@ endif

DIRS-$(CONFIG_VHOST) += vhost

# These dependencies are not based specifically on symbols, but rather
# the subsystem dependency tree defined within the event subsystem C files
# themselves. Should that tree change, these dependencies should change
# accordingly.
DEPDIRS-bdev := copy vmd
DEPDIRS-iscsi := scsi
DEPDIRS-nbd := bdev
DEPDIRS-nvmf := bdev
DEPDIRS-scsi := bdev
DEPDIRS-vhost := scsi

.PHONY: all clean $(DIRS-y)

all: $(DIRS-y)