meson: create a static version of libshared and link libcore and some tests to it
This is what autoconf-based build does, and it makes test-bus-error and
test-engine able to access the bus error mapping table. OTOH, this is a heavy
price to pay: it would be excellent to link libcore.a to libsystemd-shared-NNN.so.
Otherwise we duplicate the same code in 'systemd' and 'libsystemd-shared-NNN.so'.
-rwxrwxr-x. 1 4075544 Apr 6 20:30 systemd* <-- libcore linked against libsystemd-shared.so
-rwxrwxr-x. 1 5596504 Apr 9 14:07 systemd* <-- libcore linked against libsystemd-shared.a
v2:
- update for 6b5cf3ea62
This commit is contained in:
parent
6b30f2801b
commit
f4ee10a282
|
@ -1044,7 +1044,8 @@ executable('systemd',
|
|||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount],
|
||||
libmount,
|
||||
libblkid],
|
||||
install : true,
|
||||
install_dir : rootlibexecdir)
|
||||
|
||||
|
@ -1057,7 +1058,8 @@ executable('systemd-analyze',
|
|||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount],
|
||||
libmount,
|
||||
libblkid],
|
||||
install : true)
|
||||
|
||||
executable('systemd-journald',
|
||||
|
|
|
@ -146,7 +146,7 @@ libcore = static_library(
|
|||
load_fragment_gperf_c,
|
||||
load_fragment_gperf_nulstr_c,
|
||||
include_directories : includes,
|
||||
link_with : [libshared],
|
||||
link_with : [libshared_static],
|
||||
dependencies : [threads,
|
||||
libpam,
|
||||
libaudit,
|
||||
|
|
|
@ -129,10 +129,6 @@ tests += [
|
|||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-error.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-gvariant.c'],
|
||||
[],
|
||||
[libglib,
|
||||
|
|
|
@ -144,6 +144,24 @@ libshared = shared_library(
|
|||
install : true,
|
||||
install_dir : rootlibexecdir)
|
||||
|
||||
libshared_static = static_library(
|
||||
libshared_name,
|
||||
shared_sources,
|
||||
basic_sources,
|
||||
include_directories : includes,
|
||||
dependencies : [threads,
|
||||
librt,
|
||||
libcap,
|
||||
libacl,
|
||||
libcryptsetup,
|
||||
libiptc,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libidn,
|
||||
libxz,
|
||||
liblz4,
|
||||
libblkid])
|
||||
|
||||
if conf.get('HAVE_LIBIPTC', 0) == 1
|
||||
libfirewall = static_library(
|
||||
'firewall',
|
||||
|
|
|
@ -23,40 +23,60 @@ tests += [
|
|||
[]],
|
||||
|
||||
[['src/test/test-engine.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-job-type.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-ns.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount],
|
||||
libmount,
|
||||
libblkid],
|
||||
'', 'unsafe'],
|
||||
|
||||
[['src/test/test-loopback.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-hostname.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount],
|
||||
libmount,
|
||||
libblkid],
|
||||
'', 'unsafe'],
|
||||
|
||||
[['src/test/test-dns-domain.c'],
|
||||
|
@ -70,18 +90,26 @@ tests += [
|
|||
'ENABLE_EFI'],
|
||||
|
||||
[['src/test/test-unit-name.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-unit-file.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-utf8.c'],
|
||||
[libshared],
|
||||
|
@ -100,7 +128,7 @@ tests += [
|
|||
[]],
|
||||
|
||||
[['src/test/test-copy.c'],
|
||||
[libshared],
|
||||
[libshared_static],
|
||||
[]],
|
||||
|
||||
[['src/test/test-sigbus.c'],
|
||||
|
@ -237,8 +265,10 @@ tests += [
|
|||
[]],
|
||||
|
||||
[['src/test/test-namespace.c'],
|
||||
[libcore],
|
||||
[]],
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[libblkid]],
|
||||
|
||||
[['src/test/test-verbs.c'],
|
||||
[libshared],
|
||||
|
@ -407,11 +437,15 @@ tests += [
|
|||
|
||||
|
||||
[['src/test/test-cgroup-mask.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-cgroup-util.c'],
|
||||
[libshared],
|
||||
|
@ -434,18 +468,26 @@ tests += [
|
|||
[]],
|
||||
|
||||
[['src/test/test-path.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-execute.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-siphash24.c'],
|
||||
[libshared],
|
||||
|
@ -456,7 +498,8 @@ tests += [
|
|||
[]],
|
||||
|
||||
[['src/test/test-install.c'],
|
||||
[libcore],
|
||||
[libcore,
|
||||
libsystemd],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
|
@ -465,11 +508,15 @@ tests += [
|
|||
[]],
|
||||
|
||||
[['src/test/test-sched-prio.c'],
|
||||
[libcore],
|
||||
[librt,
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount]],
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-conf-files.c'],
|
||||
[libshared],
|
||||
|
@ -611,6 +658,15 @@ tests += [
|
|||
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/libsystemd/sd-bus/test-bus-error.c'],
|
||||
[libshared_static,
|
||||
libsystemd],
|
||||
[]],
|
||||
]
|
||||
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/libsystemd-network/test-dhcp-option.c',
|
||||
'src/libsystemd-network/dhcp-protocol.h',
|
||||
|
|
Loading…
Reference in New Issue