devtools/test-meson-builds: reduce output size
PATCH 1/1 devtools/test-meson-builds: reduce output size
The various builds done by the "test-meson-builds.sh" script can take a large amount of space on disk. Some simple changes allow us to reduce the space used significantly. Specifically:
* use the default "release" build, which does not include debug information, for builds where we won't check ABI.
* use shared linkage rather than static for the 32-bit builds.
After making these changes a set of builds produced by test-meson-builds shrank from ~17G to ~7G on my system.
--- devtools/test-meson-builds.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
devtools/test-meson-builds.sh +14 -9
@@ -103,13 +103,19 @@ load_env () # <target compiler> command -v $targetcc >/dev/null 2>&1 || return 1 } -config () # <dir> <builddir> <meson options> +config () # <dir> <builddir> <ABI check> <meson options> { dir=$1 shift builddir=$1 shift + abicheck=$1 + shift + if [ -f "$builddir/build.ninja" ] ; then + if [ "$abicheck" != ABI ] ; then + return + fi # for existing environments, switch to debugoptimized if unset # so that ABI checks can run if ! $MESON configure $builddir |
@@ -130,7 +136,9 @@ config () # <dir> <builddir> <meson options> else options="$options -Dexamples=l3fwd" # save disk space fi - options="$options --buildtype=debugoptimized" + if [ "$abicheck" = ABI ] ; then + options="$options --buildtype=debugoptimized" + fi for option in $DPDK_MESON_OPTIONS ; do options="$options -D$option" done
@@ -181,7 +189,7 @@ build () # <directory> <target cc | cross file> <ABI check> [meson options] cross= fi load_env $targetcc || return 0 - config $srcdir $builds_dir/$targetdir $cross --werror $* + config $srcdir $builds_dir/$targetdir $abicheck $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" -a "$abicheck" = ABI ] ; then abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION
@@ -255,14 +263,11 @@ build build-x86-generic cc skipABI -Dcheck_includes=true \ if check_cc_flags '-m32' ; then target_override='i386-pc-linux-gnu' if [ -d '/usr/lib/i386-linux-gnu' ] ; then - # 32-bit pkgconfig on Debian/Ubuntu, use cross file - build build-32b $srcdir/config/x86/cross-32bit-debian.ini ABI + build build-32b $srcdir/config/x86/cross-32bit-debian.ini ABI $use_shared elif [ -d '/usr/lib32' ] ; then - # 32-bit pkgconfig on Arch - build build-32b $srcdir/config/x86/cross-32bit-arch.ini ABI + build build-32b $srcdir/config/x86/cross-32bit-arch.ini ABI $use_shared else - # 32-bit pkgconfig on RHEL/Fedora (lib vs lib64) - build build-32b $srcdir/config/x86/cross-32bit-fedora.ini ABI + build build-32b $srcdir/config/x86/cross-32bit-fedora.ini ABI $use_shared fi target_override= fi
Signature · 1 line
2.48.1
This email is triggering a rerun of testing at the DPDK Community Lab for this patchseries.
Recheck-request: iol-intel-Functional
20/10/2025 17:55, Bruce Richardson:
Quoted 11 lines
The various builds done by the "
test-meson-builds.sh" script can take a large amount of space on disk. Some simple changes allow us to reduce the space used significantly. Specifically:
* use the default "release" build, which does not include debug information, for builds where we won't check ABI.
* use shared linkage rather than static for the 32-bit builds.After making these changes a set of builds produced by test-meson-builds shrank from ~17G to ~7G on my system.
Signed-off-by Bruce Richardson <[email protected]>
I agree with this change. I had done something similar 4 years ago:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
My patch was also adding build types "debug" and "minsize". Now that clang is fixed, I will work on it (requires fixes for minsize).
Your patch shrinks the build directory from 20G to 9G in my setup.
[...]
devtools/test-meson-builds.sh build () # <directory> <target cc | cross file> <ABI check> [meson options] · line 192
Quoted 2 lines
devtools/test-meson-builds.sh +1
-1- config $srcdir $builds_dir/$targetdir $cross --werror $* + config $srcdir $builds_dir/$targetdir $abicheck $cross --werror $*
There is another call to the function config() for the ABI ref build which requires to add the new ABI parameter:
- config $abirefdir/src $abirefdir/build $cross \
+ config $abirefdir/src $abirefdir/build ABI $cross \
-Dexamples= $*
compile $abirefdir/buildApplied with this change, thanks.