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.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466081 (master)

(cherry picked from commit 5c62618f26)
Change-Id: Ic986281a162ac20b523486e9f8cccf4a0787afd7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466983
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Seth Howell 2019-08-22 15:06:05 -07:00 committed by Jim Harris
parent ec06de31cf
commit 79602d10c6
2 changed files with 25 additions and 8 deletions

View File

@ -128,15 +128,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

View File

@ -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)