[v3,2/3] build: remove 5 libs from mandatory list

Message ID 20231220142152.492556-3-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series Improve optional lib support |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Dec. 20, 2023, 2:21 p.m. UTC
  Remove five more libs from the mandatory build list. Only one needing
any special treatment is LPM, which is an optional dependency for some
secondary process autotests.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/meson.build | 4 ++--
 lib/meson.build      | 5 -----
 2 files changed, 2 insertions(+), 7 deletions(-)
  

Comments

Morten Brørup Dec. 20, 2023, 3:18 p.m. UTC | #1
> From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> Sent: Wednesday, 20 December 2023 15.22
> 
> Remove five more libs from the mandatory build list. Only one needing
> any special treatment is LPM, which is an optional dependency for some
> secondary process autotests.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---

Good stuff.

Acked-by: Morten Brørup <mb@smartsharesystems.com>

<rant>
As previously discussed, I would like to see 'meter' become optional too, but it's probably too deeply embedded into the ethdev lib.

And I somehow missed that the 'telemetry' lib was not optional when it was added, so now we're stuck with all the bloat that comes with it. :-(
</rant>
  
Bruce Richardson Dec. 20, 2023, 4:05 p.m. UTC | #2
On Wed, Dec 20, 2023 at 04:18:32PM +0100, Morten Brørup wrote:
> > From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> > Sent: Wednesday, 20 December 2023 15.22
> > 
> > Remove five more libs from the mandatory build list. Only one needing
> > any special treatment is LPM, which is an optional dependency for some
> > secondary process autotests.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> 
> Good stuff.
> 
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
> 
> <rant>
> As previously discussed, I would like to see 'meter' become optional too, but it's probably too deeply embedded into the ethdev lib.
> 
The metering stuff I think is in separate files, so it might not be too
difficult to separate.

> And I somehow missed that the 'telemetry' lib was not optional when it was added, so now we're stuck with all the bloat that comes with it. :-(

I've been thinking about this, and I will hopefully try prototyping some
ways to make it optional in future. Will probably need function stubs
somewhere to make things clean.

As with the meter stuff, it's probably just a matter of having a bit of
time to look at it.

/Bruce
  

Patch

diff --git a/app/test/meson.build b/app/test/meson.build
index dcc93f4a43..6389ae83ee 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -7,7 +7,7 @@  sources += files('commands.c', 'test.c')
 
 # optional dependencies: some files may use these - and so we should link them in -
 # but do not explicitly require them so they are not listed in the per-file lists below
-optional_deps = ['crypto_scheduler']
+optional_deps = ['crypto_scheduler', 'lpm']
 
 # some other utility C files, providing functions used by various tests
 # so we need to include these deps in the dependency list for the files using those fns.
@@ -126,7 +126,7 @@  source_file_deps = {
     'test_memzone.c': [],
     'test_meter.c': ['meter'],
     'test_metrics.c': ['metrics'],
-    'test_mp_secondary.c': ['hash', 'lpm'],
+    'test_mp_secondary.c': ['hash'],
     'test_net_ether.c': ['net'],
     'test_pcapng.c': ['ethdev', 'net', 'pcapng', 'bus_vdev'],
     'test_pdcp.c': ['eventdev', 'pdcp', 'net', 'timer', 'security'],
diff --git a/lib/meson.build b/lib/meson.build
index 8c922d3097..72e9138d14 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,26 +76,21 @@  if is_ms_compiler
 endif
 
 always_enable = [
-        'acl',
         'cmdline',
         'eal',
         'ethdev',
-        'fib',
         'hash',
         'kvargs',
         'log',
-        'lpm',
         'mbuf',
         'mempool',
         'meter',
         'net',
         'pci',
         'rcu',
-        'rib',
         'ring',
         'stack',
         'telemetry',
-        'timer',
 ]
 
 enable_deprecated_libs = []