From: Lucas De Marchi Date: Fri, 24 Apr 2026 14:55:51 +0000 (-0500) Subject: meson: Make dlopen=all the default X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7441ff742a665b49792201e23f37eee3a7ff79e;p=thirdparty%2Fkmod.git meson: Make dlopen=all the default 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 Link: https://github.com/kmod-project/kmod/pull/420 Signed-off-by: Lucas De Marchi --- diff --git a/README.md b/README.md index 2f11d09f..a5ef3d3d 100644 --- 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/ diff --git a/meson_options.txt b/meson_options.txt index 9fc5b564..9c215f50 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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(