Commit 1b56233c authored by Jim Harris's avatar Jim Harris
Browse files

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: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I5622f4c3adb2d5ccd5ae33cb4cd116716134a9b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4512


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatar <dongx.yi@intel.com>
parent bf13dc48
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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)

+3 −7
Original line number Diff line number Diff line
@@ -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