dpdkbuild: don't re-install unchanged shared libs
When configuring with --with-shared, you would see all applications getting relinked, even if nothing has changed. This was root caused to DPDK re-installing shared libraries that hadn't been rebuilt. Switching from 'ninja install' to 'meson install --only-changed' fixes this behavior. Note that meson install doesn't support -j, but at this point we are only installing files, not building them - and now we won't even be installing the files again if they haven't changed. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: If0491b2ad6e8564ad0fd8dee39a2e357e1329ea9 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4465 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
d37a5797ef
commit
d0b8347d9e
@ -141,12 +141,16 @@ all: $(SPDK_ROOT_DIR)/dpdk/build-tmp
|
||||
# /usr/local) instead of replacing it. --prefix needs to be an absolute path, so we set \
|
||||
# it to / and then set DESTDIR directly, so libs and headers are copied to "DESTDIR//". \
|
||||
# DPDK kernel modules are set to install in $DESTDIR/boot/modules, but we move them \
|
||||
# to DESTDIR/kmod to be consistent with the makefile build.
|
||||
# to DESTDIR/kmod to be consistent with the makefile build. \
|
||||
# \
|
||||
# Also use meson install --only-changed instead of ninja install so that the shared \
|
||||
# libraries don't get reinstalled when they haven't been rebuilt - this avoids all of \
|
||||
# our applications getting relinked even when nothing has changed.
|
||||
$(Q)if [ "$(OS)" = "FreeBSD" ]; then \
|
||||
env -u MAKEFLAGS DESTDIR=$(SPDK_ROOT_DIR)/dpdk/build ninja -C $(SPDK_ROOT_DIR)/dpdk/build-tmp $(MAKE_NUMJOBS) install > /dev/null && \
|
||||
mv $(SPDK_ROOT_DIR)/dpdk/build/boot/modules $(SPDK_ROOT_DIR)/dpdk/build/kmod; \
|
||||
else \
|
||||
env -u MAKEFLAGS ninja -C $(SPDK_ROOT_DIR)/dpdk/build-tmp $(MAKE_NUMJOBS) install > /dev/null; \
|
||||
env -u MAKEFLAGS meson install -C $(SPDK_ROOT_DIR)/dpdk/build-tmp --only-changed > /dev/null; \
|
||||
fi
|
||||
|
||||
$(SPDK_ROOT_DIR)/dpdk/build-tmp: $(SPDK_ROOT_DIR)/mk/cc.mk $(SPDK_ROOT_DIR)/include/spdk/config.h
|
||||
|
Loading…
Reference in New Issue
Block a user