mirror of
https://github.com/systemd/systemd.git
synced 2025-01-18 10:04:04 +03:00
meson: build libsystemd-core via an intermediate static library
By itself, this is not useful. I'm making this a separate commit to make debugging easier. It turns out that meson does static libraries using references, so the "static library" a tiny stub stub that refers to the object files on disk and this has negligible cost: $ ls -lhd build/src/core/libsystemd-core-257.{a,so} -rw-r--r-- 1 zbyszek zbyszek 36K Jul 3 16:54 build/src/core/libsystemd-core-257.a -rwxr-xr-x 1 zbyszek zbyszek 6.1M Jul 3 16:54 build/src/core/libsystemd-core-257.so (cherry picked from commit d0689ee5fbfafa736e6eca89bc80cb2d372f2229)
This commit is contained in:
parent
9be2fe707e
commit
c3b4032fc3
@ -110,17 +110,13 @@ load_fragment_gperf_nulstr_c = custom_target(
|
|||||||
|
|
||||||
libcore_name = 'systemd-core-@0@'.format(shared_lib_tag)
|
libcore_name = 'systemd-core-@0@'.format(shared_lib_tag)
|
||||||
|
|
||||||
libcore = shared_library(
|
libcore_static = static_library(
|
||||||
libcore_name,
|
libcore_name,
|
||||||
libcore_sources,
|
libcore_sources,
|
||||||
load_fragment_gperf_c,
|
load_fragment_gperf_c,
|
||||||
load_fragment_gperf_nulstr_c,
|
load_fragment_gperf_nulstr_c,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
c_args : ['-fvisibility=default'],
|
c_args : ['-fvisibility=default'],
|
||||||
link_args : ['-shared',
|
|
||||||
'-Wl,--version-script=' + libshared_sym_path],
|
|
||||||
link_depends : libshared_sym_path,
|
|
||||||
link_with : libshared,
|
|
||||||
dependencies : [libacl,
|
dependencies : [libacl,
|
||||||
libapparmor,
|
libapparmor,
|
||||||
libaudit,
|
libaudit,
|
||||||
@ -135,6 +131,16 @@ libcore = shared_library(
|
|||||||
libselinux,
|
libselinux,
|
||||||
threads,
|
threads,
|
||||||
userspace],
|
userspace],
|
||||||
|
build_by_default : false)
|
||||||
|
|
||||||
|
libcore = shared_library(
|
||||||
|
libcore_name,
|
||||||
|
c_args : ['-fvisibility=default'],
|
||||||
|
link_args : ['-shared',
|
||||||
|
'-Wl,--version-script=' + libshared_sym_path],
|
||||||
|
link_depends : libshared_sym_path,
|
||||||
|
link_whole: libcore_static,
|
||||||
|
link_with : libshared,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : pkglibdir)
|
install_dir : pkglibdir)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user