chiark / gitweb /
meson: use a convenience lib for journal user sources
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 19 Dec 2017 18:38:43 +0000 (19:38 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:49:48 +0000 (07:49 +0200)
Instead of compiling those files twice, once for libsystemd and once for
libshared, compile once as a static archive and then link into both.
This reduce the meson target for man=no compile to 1291.

meson.build
src/shared/meson.build

index 6883d4a7a892681d2aad63e4410a48cc063cf27f..bbd4ed34038184c82f250c0eaa2e117468cb00e2 100644 (file)
@@ -1437,14 +1437,14 @@ subdir('src/login')
 # libsystemd_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libsystemd_sym)
 # libsystemd = shared_library(
 #         'systemd',
-#         journal_internal_sources,
 #         version : libsystemd_version,
 #         include_directories : includes,
 #         link_args : ['-shared',
 #                      '-Wl,--version-script=' + libsystemd_sym_path],
 #         link_with : [libbasic,
 #                      libbasic_gcrypt],
-#         link_whole : libsystemd_static,
+#         link_whole : [libsystemd_static,
+#                       libjournal_client],
 #         dependencies : [threads,
 #                         librt,
 #                         libxz,
index 89f11a51cbd76cd1038ba65e2a8853c63c1431fa..de1a98f1257d143233789fa7fad8afc0fc759e8d 100644 (file)
@@ -201,7 +201,6 @@ libshared_static = static_library(
 libshared = shared_library(
         libshared_name,
 #if 0 /// UNNEEDED by elogind
-#         journal_internal_sources,
 #         libudev_sources,
 #         include_directories : includes,
 #         link_args : ['-shared',
@@ -209,7 +208,8 @@ libshared = shared_library(
 #         link_whole : [libshared_static,
 #                       libbasic,
 #                       libbasic_gcrypt,
-#                       libsystemd_static],
+#                       libsystemd_static,
+#                       libjournal_client],
 #else
         libelogind_internal_sources,
 #endif // 0