build: add SPDK_NO_LIB_DEPS to build libraries w/o dependencies

Our check_so_deps.sh test script removes the spdk.lib_deps.mk
include from spdk.lib.mk so that we can check which symbols
the libraries depend on.  But modifying the code like this
is a bit kludgy.  So instead add a Makefile variable that
check_so_deps.sh can set to get the same behavior.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5622f4c3adb2d5ccd5ae33cb4cd116716134a9b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4512
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
This commit is contained in:
Jim Harris 2020-10-02 14:30:10 +00:00
parent bf13dc4801
commit 1b56233c0c
2 changed files with 5 additions and 7 deletions

View File

@ -76,7 +76,9 @@ else
BUILD_DEP := $(DEP)
endif
ifeq ($(SPDK_NO_LIB_DEPS),)
SPDK_DEP_LIBS = $(call spdk_lib_list_to_shared_libs,$(DEPDIRS-$(LIBNAME)))
endif
.PHONY: all clean $(DIRS-y)

View File

@ -223,11 +223,6 @@ function confirm_deps() {
fi
}
# By removing the spdk.lib_deps.mk file from spdk.lib.mk, we ensure that we won't
# create any link dependencies. Then we can be sure we get a valid accounting of the
# symbol dependencies we have.
sed -i -e 's,include $(SPDK_ROOT_DIR)/mk/spdk.lib_deps.mk,,g' "$rootdir/mk/spdk.lib.mk"
source ~/autorun-spdk.conf
config_params=$(get_config_params)
if [ "$SPDK_TEST_OCF" -eq 1 ]; then
@ -236,7 +231,9 @@ fi
$MAKE $MAKEFLAGS clean
./configure $config_params --with-shared
$MAKE $MAKEFLAGS
# By setting SPDK_NO_LIB_DEPS=1, we ensure that we won't create any link dependencies.
# Then we can be sure we get a valid accounting of the symbol dependencies we have.
SPDK_NO_LIB_DEPS=1 $MAKE $MAKEFLAGS
xtrace_disable
@ -265,7 +262,6 @@ fi
)
$MAKE $MAKEFLAGS clean
git checkout "$rootdir/mk/spdk.lib.mk"
if [ -f $fail_file ]; then
rm -f $fail_file