devtools: reduce examples in static builds
authorThomas Monjalon <thomas@monjalon.net>
Fri, 17 Apr 2020 22:16:56 +0000 (00:16 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 21 Apr 2020 09:17:38 +0000 (11:17 +0200)
Static builds can take a lot of space, so reduce the number of examples
built when testing those static builds.

As makefile-based build is close to end of life, completely skip examples
in case of static linkage with make.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
devtools/test-build.sh
devtools/test-meson-builds.sh

index e6e4058..a298115 100755 (executable)
@@ -257,6 +257,7 @@ for conf in $configs ; do
        echo "================== Build examples for $conf"
        export RTE_SDK=$(readlink -f $dir)/install/share/dpdk
        ln -sTf $(pwd)/lib $RTE_SDK/lib # workaround for vm_power_manager
+       grep -q 'SHARED_LIB=n' $dir/.config || # skip examples with static libs
        ${MAKE} -j$J -sC examples \
                EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose \
                O=$(readlink -f $dir)/examples
index c1ff2bb..e8df017 100755 (executable)
@@ -74,7 +74,12 @@ config () # <dir> <builddir> <meson options>
                return
        fi
        options=
-       options="$options --werror -Dexamples=all"
+       options="$options --werror"
+       if echo $* | grep -qw -- '--default-library=shared' ; then
+               options="$options -Dexamples=all"
+       else
+               options="$options -Dexamples=l3fwd" # save disk space
+       fi
        options="$options --buildtype=debugoptimized"
        for option in $DPDK_MESON_OPTIONS ; do
                options="$options -D$option"