]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: reuse libsystemd_static for libsystemd
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 19 Dec 2017 10:53:53 +0000 (11:53 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 21 Dec 2017 16:01:23 +0000 (17:01 +0100)
This gets rid of recompilation, making things faster and avoids duplicated warnings.
The result seems to be the same:
$ ls -l build/libsystemd.so.0.20.0 build2/libsystemd.so.0.20.0
-rwxrwxr-x. 1 zbyszek zbyszek 3071312 Dec 19 11:45 build2/libsystemd.so.0.20.0
-rwxrwxr-x. 1 zbyszek zbyszek 3071760 Dec 19 11:11 build/libsystemd.so.0.20.0
$ diff -U1 <(objdump -T build/libsystemd.so.0.20.0|sed -r 's/[0-9a-f]{16}/________________/g') <(objdump -T build2/libsystemd.so.0.20.0|sed -r 's/[0-9a-f]{16}/________________/g')
-build/libsystemd.so.0.20.0:     file format elf64-x86-64
+build2/libsystemd.so.0.20.0:     file format elf64-x86-64

meson.build

index 9dabf342d230046676df35efb69ea948760ff767..70b2d1b2c902a6d1ed3b1dd998eecda18d91da14 100644 (file)
@@ -1258,13 +1258,13 @@ libjournal_core = static_library(
 libsystemd_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libsystemd_sym)
 libsystemd = shared_library(
         'systemd',
-        libsystemd_sources,
         journal_internal_sources,
         version : libsystemd_version,
         include_directories : includes,
         link_args : ['-shared',
                      '-Wl,--version-script=' + libsystemd_sym_path],
-        link_with : [libbasic],
+        link_with : libbasic,
+        link_whole : libsystemd_static,
         dependencies : [threads,
                         libgcrypt,
                         librt,