From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [RFC PATCH 12/12] build: simplify mandatory library lists
Date: Fri, 16 Oct 2026 11:59:50 +0100 [thread overview]
Message-ID: <20261016105950.273068-13-bruce.richardson@intel.com> (raw)
In-Reply-To: <20261016105950.273068-1-bruce.richardson@intel.com>
Rather than listing out all the libraries we think need to be built,
let's just have a minimal set that are necessary to build the minimal
set of drivers. Use the existing dependency resolution script to build
that minimal required library and driver set.
This change necessitates a change to test-meson-builds.sh since ethdev
is no longer in the always-required set, meaning that a minimal build
will error out if net/null is added as a required driver.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
The change to test-meson-builds.sh will cause issues for anyone who is
using an already-configured set of build directories, as the script does
not attempt any reconfiguration. For now, to avoid any potential testing
issues, I've side-stepped the issue by adjusting the directory name from
build-mini to build-minimal. This will configure a new directory rather
than reusing the old one with the broken config.
---
devtools/test-meson-builds.sh | 3 +--
drivers/meson.build | 8 ++++----
lib/meson.build | 22 ++++------------------
meson.build | 13 +++++++++++++
4 files changed, 22 insertions(+), 24 deletions(-)
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 501034f398..9128d6bda7 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -249,8 +249,7 @@ for c in gcc clang ; do
done
done
-build build-mini cc skipABI $use_shared -Ddisable_libs=* \
- -Denable_drivers=net/null
+build build-minimal cc skipABI $use_shared -Ddisable_libs=*
# test compilation with minimal x86 instruction set
# Set the install path for libraries to "lib" explicitly to prevent problems
diff --git a/drivers/meson.build b/drivers/meson.build
index aacfe29c46..29b473eb04 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -79,10 +79,10 @@ foreach d:requested_drivers
endforeach
require_drivers = requested_drivers.length() != 0
-# these drivers must always be enabled, otherwise the build breaks
-always_enable = ['bus/pci', 'bus/vdev']
-# we always need a mempool driver, and ring is default, so make it mandatory
-always_enable += ['mempool/ring']
+# these drivers must always be enabled, otherwise the build breaks; the
+# full set, including their own dependencies, is computed once at the top
+# level
+always_enable = dpdk_min_required_drivers
# expand the requested drivers to also include the drivers they depend on; with
# no drivers requested every driver is wanted, so no list is needed
diff --git a/lib/meson.build b/lib/meson.build
index 34fbd93977..e4998d1090 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -70,24 +70,10 @@ libraries = [
'node',
]
-always_enable = [
- 'argparse',
- 'cmdline',
- 'eal',
- 'ethdev',
- 'hash',
- 'kvargs',
- 'log',
- 'mbuf',
- 'mempool',
- 'meter',
- 'net',
- 'pci',
- 'rcu',
- 'ring',
- 'stack',
- 'telemetry',
-]
+# these libraries must always be enabled, otherwise the build breaks; the
+# full set, including their own dependencies, is computed once at the top
+# level, from the libraries that the mandatory drivers need
+always_enable = dpdk_min_required_libs
enable_deprecated_libs = []
foreach l:run_command(list_dir_globs, get_option('enable_deprecated_libs'),
diff --git a/meson.build b/meson.build
index 4536f7e9c5..8d31230528 100644
--- a/meson.build
+++ b/meson.build
@@ -96,6 +96,19 @@ dpdk_deps_graph = configure_file(
capture: true,
output: 'dependencies.txt')
+# these drivers must always be enabled, otherwise the build breaks: a PCI bus
+# driver, a vdev bus driver, and a mempool driver, with ring as the default
+dpdk_min_required_driver_paths = ['bus/pci', 'bus/vdev', 'mempool/ring']
+
+# the mandatory drivers' own dependencies are mandatory too, as are the
+# libraries they need, so none of them can be left out of the build
+dpdk_min_required_drivers = run_command(resolve_deps_cmd, dpdk_deps_graph,
+ '--drivers', dpdk_min_required_driver_paths,
+ check: true).stdout().strip().split(',')
+dpdk_min_required_libs = run_command(resolve_deps_cmd, dpdk_deps_graph,
+ '--libs', dpdk_min_required_driver_paths,
+ check: true).stdout().strip().split(',')
+
# build libs and drivers
subdir('lib')
subdir('drivers')
--
2.53.0
next prev parent reply other threads:[~2026-10-16 11:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 10:59 [RFC PATCH 00/12] Add config-time dependency tracking Bruce Richardson
2026-10-16 10:59 ` [RFC PATCH 01/12] build: fix name of base library object Bruce Richardson
2026-10-16 10:59 ` [RFC PATCH 02/12] build: fix ignoring requested driver when class is disabled Bruce Richardson
2026-10-16 10:59 ` [RFC PATCH 03/12] build: prevent overlap of enable and disable lists Bruce Richardson
2026-10-16 10:59 ` [RFC PATCH 04/12] build: add direct support for optional dependencies Bruce Richardson
2026-10-16 10:59 ` [RFC PATCH 05/12] net/bond: rename directory for consistency Bruce Richardson
2026-10-16 10:59 ` [RFC PATCH 06/12] build: add script to generate dependencies list Bruce Richardson
2026-10-16 10:59 ` [RFC PATCH 07/12] build: use recursive addition for enabled libraries option Bruce Richardson
2026-10-16 10:59 ` [RFC PATCH 08/12] build: use recursive addition for enabled drivers option Bruce Richardson
2026-10-16 10:59 ` [RFC PATCH 09/12] build: improve error reporting for unbuildable components Bruce Richardson
2026-10-16 10:59 ` [RFC PATCH 10/12] build: add EAL common directory to global include list Bruce Richardson
2026-10-16 10:59 ` [RFC PATCH 11/12] build: make EAL an explicit dependency Bruce Richardson
2026-10-16 10:59 ` Bruce Richardson [this message]
2026-10-16 14:35 ` [RFC PATCH 00/12] Add config-time dependency tracking David Marchand
2026-10-16 14:44 ` Bruce Richardson
2026-10-16 14:51 ` David Marchand
2026-10-16 15:42 ` Bruce Richardson
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=20261016105950.273068-13-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