]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
meson: Make dlopen=all the default
authorLucas De Marchi <demarchi@kernel.org>
Fri, 24 Apr 2026 14:55:51 +0000 (09:55 -0500)
committerLucas De Marchi <demarchi@kernel.org>
Thu, 7 May 2026 05:57:56 +0000 (00:57 -0500)
As of earlier commit, all dependencies can be dlopen'd on demand. Do
that for all optional libraries by default, but still allow it to be
overridden during build.

Example numbers/benefits taken from `modprobe --show-depends nouveau`:

 - fewer instr - 50% reduction, 1.2M -> 0.5M
 - less memory use - Rss by ~33%, 3M -> 2M
 - reduced attack surface

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/420
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
README.md
meson_options.txt

index 2f11d09f2e5e69f333922180958c571fc57618d7..a5ef3d3d877ec02baa49aba39d9e4be420ed8913 100644 (file)
--- a/README.md
+++ b/README.md
@@ -48,7 +48,8 @@ Optional dependencies, required with the default build configuration:
 - ZSTD library
 - OPENSSL library (signature handling in modinfo)
 
-Typical configuration and installation
+All the optional dependencies are loaded on demand via `dlopen` by default. This can
+be changed via the `dlopen` build option. Typical configuration and installation:
 
     meson setup builddir/
     meson compile -C builddir/
index 9fc5b56486f8b8e4c0b25d1e4b3a22230c645a3b..9c215f50da0f54070b2aa0e5dd139db931e797ee 100644 (file)
@@ -71,8 +71,8 @@ option(
   'dlopen',
   type : 'array',
   choices : ['zstd', 'xz', 'zlib', 'openssl', 'all'],
-  value : [],
-  description : 'Libraries to dlopen rather than linking. Use \'all\' to . Default: none',
+  value : ['all'],
+  description : 'Libraries to dlopen rather than linking. Default: "all"',
 )
 
 option(