Automatically place binaries produced from the app directory
into build/bin. This matches with the output in build/lib
that already exists.
Change-Id: I13cd2da71d2f88592e22308fe8a907bf458458b5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2379
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Add uninstall target to makefiles to be able to perform
reverse of install target.
Fixes#464
This patch adds 'uninstall' target to makefile.
'make uninstall' will remove spdk_tgt app, headers, libraries
and shared libraries from system directories defined by $DESTDIR.
Additionaly, if there will be any empty directories left after
this operation, they will be removed as well.
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I7b07fb4b81081d3914ff09165991fbe3a26b9067
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/431471
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Add a CLEAN_FILES macro that shared_lib/Makefile can use
to add to the list of files to be cleaned.
Fixes#663.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I12982e0989e02a69aaea4e470777301280090096
Reviewed-on: https://review.gerrithub.io/c/444427
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This removes a ton of duplicate from a lot of
Makefiles. Note that spdk.unittest.mk still keeps
its own app rules, and now just includes
spdk.app_vars.mk instead. Fixing Makefiles that
include this .mk file requires more work that is
deferred for now. We do need to add the
"install: all" rule explicitly to this .mk files.
Note that Makefiles need to include spdk.app.mk
now at the end of the file, so that things like
APP and SPDK_LIB_LIST are defined before including
it.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If6823cda135180c37690ffc96c91660b7f0718e3
Reviewed-on: https://review.gerrithub.io/434283
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This is a step towards moving a lot of the boilerplate
rules in various application Makefiles into mk/spdk.app.mk.
We will need to add a mk/spdk.app_cxx.mk for our C++
applications, but that will need to share these same
variables.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaee73a4fa47ff2ee54f1a1ea3c0d2097900df218
Reviewed-on: https://review.gerrithub.io/434278
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
SPDK uses constructor functions for registration functionality
in several different areas - RPCs, bdev modules, event tracing,
etc. Since these functions are not explicitly referenced, the
linker will remove these constructor functions from the linked
application unless their library is included using the
--whole-archive linker option.
SPDK has tried to minimize the number of libraries linked with
--whole-archive to only those that are necessary. But there
are still a lot of exceptions that we need to work around. The
benefit to trying to restrict it is minimal - for example,
an nvmf_tgt binary built before this patch is 4746320 bytes
on my system, but linking all of the libraries with
--whole-archive only increases it to 4784080 bytes - a difference
of less than 1%.
Note that DPDK also links all libraries with --whole-archive by
default.
This will also simplify some upcoming changes around shared
library dependencies - we will be able to blindly use
--whole-archive when linking the shared library as well.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iab0dbbace06a3d15c835491e55683ab4cf9e53f0
Reviewed-on: https://review.gerrithub.io/434107
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
There was an implicit merge conflict between this patch
and e956be96e which added NVMe/TCP support including adding
"sock" as an nvme.libtest.mk depdendency.
This reverts commit 7962ce312d.
Change-Id: Ie7e58e89128f28080a986e12cd014de7df4752e5
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-on: https://review.gerrithub.io/434103
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This matches the lib/ut_mock directory name, and also
avoids the final library being named spdk_spdk_mock.a.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I80ec09568d0455d1f131e45694b6e2d536e6ca91
Reviewed-on: https://review.gerrithub.io/433909
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
SPDK uses constructor functions for registration functionality
in several different areas - RPCs, bdev modules, event tracing,
etc. Since these functions are not explicitly referenced, the
linker will remove these constructor functions from the linked
application unless their library is included using the
--whole-archive linker option.
SPDK has tried to minimize the number of libraries linked with
--whole-archive to only those that are necessary. But there
are still a lot of exceptions that we need to work around. The
benefit to trying to restrict it is minimal - for example,
an nvmf_tgt binary built before this patch is 4746320 bytes
on my system, but linking all of the libraries with
--whole-archive only increases it to 4784080 bytes - a difference
of less than 1%.
Note that DPDK also links all libraries with --whole-archive by
default.
This will also simplify some upcoming changes around shared
library dependencies - we will be able to blindly use
--whole-archive when linking the shared library as well.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iab0dbbace06a3d15c835491e55683ab4cf9e53fe
Reviewed-on: https://review.gerrithub.io/432917
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
While here, change spdk_lib_list_to_files to
spdk_lib_list_to_static_libs to differentiate it from
the new spdk_lib_list_to_shared_libs.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6e5913addfbdd556fae2451d4e2b2c43feaf33ab
Reviewed-on: https://review.gerrithub.io/429286
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Unit tests define mock functions in the unit test code
itself. This links fine with static libraries, but
doesn't work if trying to link with shared libraries.
So change the unit tests to always explicitly link
with the static libraries.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3a8a60162fcab6c73a216c4bb364175767fdc62c
Reviewed-on: https://review.gerrithub.io/422441
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
When we build the SPDK_FILTER_LIB_LIST, we should
maintain the dependencies between libraries. Primary
culprit is vhost depending on scsi. So add vhost
to SPDK_FILTER_LIB_LIST before scsi, and then stop
sorting the list unnecessarily before using it.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib22a5016aa492c30a389a498ae0360fbcec7c12b
Reviewed-on: https://review.gerrithub.io/422439
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
The unit test mock library contains wrappers that aren't directly
referenced but still need to be kept to allow the final link to work
when they are used via --wrap. Add the spdk_mock library to the
whole-archive list to prevent it from getting removed.
Fixes build with LTO enabled.
Change-Id: I2c70be7cb517a373178d34026f9980396727f8df
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/401074
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
For now, this only installs libraries and headers; we will need to
consider which binaries should be installed and what they should be
named before we add them to the install rule.
Change-Id: I78dc8631f793d0df88cd884b0ac66406df9e4427
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/387637
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Much like bdev modules inside the bdev directory,
add a subsystems directory inside of event. The subsystem
specific code for the bdev library is placed in to
a separate library in that directory, breaking the
strict dependency of the bdev library on the event subsystem
code.
Change-Id: I255941b823a9ec3e2d62f22a586414949d8ff5ad
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365055
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch adds a library, application and test scripts for extending
SPDK to present virtio-scsi controllers to QEMU-based VMs and
process I/O submitted to devices attached to those controllers.
This functionality is dependent on QEMU patches to enable
vhost-scsi in userspace - those patches are currently working their
way through the QEMU mailing list, but temporary patches to enable
this functionality in QEMU will be made available shortly through the
SPDK github repository.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
Signed-off-by: Michal Kosciowski <michal.kosciowski@intel.com>
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
Change-Id: I138e4021f0ac4b1cd9a6e4041783cdf06e6f0efb