DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH] devtools/test-meson-builds: reduce output size
Date: Mon, 20 Oct 2025 16:55:36 +0100	[thread overview]
Message-ID: <20251020155536.1965938-1-bruce.richardson@intel.com> (raw)

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 <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 4fff1f7177..f1053bd7be 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -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
-- 
2.48.1


                 reply	other threads:[~2025-10-20 15:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251020155536.1965938-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).