Instead extracting/listing objects from existing static libraries, simply add those to the link list. Note that link_whole is needed otherwise, unused code will be pruned. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> --- meson.build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 264c6501..fd573826 100644 --- a/meson.build +++ b/meson.build @@ -310,15 +310,14 @@ alpm_deps = [crypto_provider, libarchive, libcurl, libintl, gpgme] libalpm_a = static_library( 'alpm_objlib', libalpm_sources, - # https://github.com/mesonbuild/meson/issues/3937 - objects : libcommon.extract_all_objects(), + link_whole: libcommon, include_directories : includes, dependencies : alpm_deps) libalpm = library( 'alpm', version : libalpm_version, - objects: libalpm_a.extract_all_objects(recursive: true), + link_whole: libalpm_a, dependencies : alpm_deps, install : true) -- 2.29.2